LLVM 9.0.1
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
llvm Namespace Reference

This class represents lattice values for constants. More...

Namespaces

namespace  AArch64
 
namespace  AMDGPU
 
namespace  amdhsa
 
namespace  ARM
 
namespace  ARMBuildAttrs
 
namespace  AttributeFuncs
 
namespace  bfi_detail
 
namespace  CallingConv
 CallingConv Namespace - This namespace contains an enum with a value for the well-known calling conventions.
 
namespace  cfg
 
namespace  cflaa
 
namespace  Check
 
namespace  cl
 cl Namespace - This namespace contains all of the command line option processing machinery.
 
namespace  CodeGenOpt
 
namespace  CodeModel
 
namespace  codeview
 
namespace  consthoist
 A private "module" namespace for types and utilities used by ConstantHoisting.
 
namespace  coro
 
namespace  detail
 Implementation details of the pass manager interfaces.
 
namespace  DomTreeBuilder
 
namespace  DOT
 
namespace  dwarf
 
namespace  FramePointer
 
namespace  GraphProgram
 
namespace  gsym
 
namespace  GVNExpression
 
namespace  IDFCalculatorDetail
 
namespace  InlineConstants
 
namespace  internal
 
namespace  IntervalMapImpl
 
namespace  Intrinsic
 This namespace contains an enum with a value for every intrinsic/builtin function known by LLVM.
 
namespace  json
 
namespace  jumpthreading
 A private "module" namespace for types and utilities used by JumpThreading.
 
namespace  legacy
 
namespace  lltok
 
namespace  LLVM_LIBRARY_VISIBILITY
 A private "module" namespace for types and utilities used by GVN.
 
namespace  lowertypetests
 
namespace  lto
 
namespace  mdconst
 Transitional API for extracting constants from Metadata.
 
namespace  Mips
 
namespace  msf
 
namespace  MSSAHelpers
 
namespace  objcarc
 
namespace  object
 
namespace  opt
 
namespace  ore
 Add a small namespace to avoid name clashes with the classes used in the streaming interface.
 
namespace  parallel
 
namespace  PatternMatch
 
namespace  pdb
 
namespace  pgo
 
namespace  PICLevel
 
namespace  PIELevel
 
namespace  PredicateInfoClasses
 
namespace  reassociate
 A private "module" namespace for types and utilities used by Reassociate.
 
namespace  Reloc
 
namespace  ScaledNumbers
 
namespace  slpvectorizer
 A private "module" namespace for types and utilities used by this pass.
 
namespace  support
 
namespace  symbolize
 
namespace  SymbolRewriter
 
namespace  SyncScope
 
namespace  sys
 
namespace  TLSModel
 
namespace  trailing_objects_internal
 
namespace  vfs
 
namespace  VNCoercion
 
namespace  wholeprogramdevirt
 
namespace  Win64EH
 
namespace  X86
 
namespace  X86Disassembler
 
namespace  yaml
 
namespace  zlib
 

Classes

class  AAEvalLegacyPass
 
class  AAEvaluator
 
class  AAManager
 A manager for alias analyses. More...
 
struct  AAMDNodes
 A collection of metadata nodes that might be associated with a memory access used by the alias-analysis infrastructure. More...
 
struct  AANonNull
 An abstract interface for all nonnull attributes. More...
 
struct  AANoRecurse
 An abstract attribute for norecurse. More...
 
struct  AANoSync
 
struct  AANoUnwind
 
class  AAQueryInfo
 This class stores info we want to provide to or retain within an alias query. More...
 
class  AAResultBase
 A CRTP-driven "mixin" base class to help implement the function alias analysis results concept. More...
 
class  AAResults
 
class  AAResultsWrapperPass
 A wrapper pass to provide the legacy pass manager access to a suitably prepared AAResults object. More...
 
struct  AAReturnedValues
 An abstract attribute for the returned values of a function. More...
 
struct  AAWillReturn
 An abstract attribute for willreturn. More...
 
struct  AbstractAttribute
 Base struct for all "concrete attribute" deductions. More...
 
class  AbstractCallSite
 AbstractCallSite. More...
 
class  AbstractLatticeFunction
 AbstractLatticeFunction - This class is implemented by the dataflow instance to specify what the lattice values are and how they handle merges etc. More...
 
struct  AbstractState
 An interface to query the internal state of an abstract attribute. More...
 
struct  ADCEPass
 A DCE pass that assumes instructions are dead until proven otherwise. More...
 
struct  add_const_past_pointer
 If T is a pointer to X, return a pointer to const X. More...
 
struct  add_const_past_pointer< T, typename std::enable_if< std::is_pointer< T >::value >::type >
 
struct  add_lvalue_reference_if_not_pointer
 If T is a pointer, just return it. If it is not, return T&. More...
 
struct  add_lvalue_reference_if_not_pointer< T, typename std::enable_if< std::is_pointer< T >::value >::type >
 
class  AddDiscriminatorsPass
 
class  AddOperator
 
class  AddressSanitizerPass
 Public interface to the address sanitizer pass for instrumenting code to check for various memory errors at runtime. More...
 
class  AddrSpaceCastInst
 This class represents a conversion between pointers from one address space to another. More...
 
class  AggressiveInstCombinePass
 
class  AliasSet
 
class  AliasSetTracker
 
class  AliasSummary
 Alias summary information. More...
 
struct  AlignedCharArray
 Helper for building an aligned character array type. More...
 
struct  AlignedCharArrayUnion
 This union template exposes a suitably aligned and sized character array member which can hold elements of any of up to ten types. More...
 
struct  AlignmentFromAssumptionsPass
 
struct  AlignTo
 alignTo for contexts where a constant expression is required. More...
 
class  AllAnalysesOn
 This templated class represents "all analyses that operate over \<a particular IR unit\>" (e.g. More...
 
class  AllocaInst
 an instruction to allocate memory on the stack More...
 
class  AllocatorBase
 CRTP base class providing obvious overloads for the core Allocate() methods of LLVM-style allocators. More...
 
class  AlwaysInlinerPass
 Inlines functions marked as "always_inline". More...
 
struct  AnalysisCallGraphWrapperPassTraits
 
struct  AnalysisInfoMixin
 A CRTP mix-in that provides informational APIs needed for analysis passes. More...
 
struct  AnalysisKey
 A special type used by analysis passes to provide an address that identifies that particular analysis pass type. More...
 
class  AnalysisManager
 A container for analyses that lazily runs them and caches their results. More...
 
struct  AnalysisResultsForFn
 Helper struct for bundling up the analysis results per function for IPSCCP. More...
 
struct  AnalysisSetKey
 A special type used to provide an address that identifies a set of related analyses. More...
 
struct  AnonStructTypeKeyInfo
 
class  AnyMemCpyInst
 This class represents any memcpy intrinsic i.e. More...
 
class  AnyMemIntrinsic
 
class  AnyMemMoveInst
 This class represents any memmove intrinsic i.e. More...
 
class  AnyMemSetInst
 This class represents any memset intrinsic. More...
 
class  AnyMemTransferInst
 
class  AppendingBinaryByteStream
 An implementation of WritableBinaryStream which can write at its end causing the underlying data to grow. More...
 
class  AppleAcceleratorTable
 This implements the Apple accelerator table format, a precursor of the DWARF 5 accelerator table format. More...
 
class  Argument
 This class represents an incoming formal argument to a Function. More...
 
class  ArgumentPromotionPass
 Argument promotion pass. More...
 
class  ARMAttributeParser
 
class  ArrayRecycler
 Recycle small arrays allocated from a BumpPtrAllocator. More...
 
class  ArrayRef
 
class  ArrayType
 Class to represent array types. More...
 
class  ASanGlobalsMetadataAnalysis
 The ASanGlobalsMetadataAnalysis initializes and returns a GlobalsMetadata object. More...
 
struct  ASanStackFrameLayout
 
struct  ASanStackVariableDescription
 
class  AShrOperator
 
class  AssemblyAnnotationWriter
 
class  AssertingVH
 Value handle that asserts if the Value is deleted. More...
 
class  AssumptionAnalysis
 A function analysis which provides an AssumptionCache. More...
 
class  AssumptionCache
 A cache of @llvm.assume calls within a function. More...
 
class  AssumptionCacheTracker
 An immutable pass that tracks lazily created AssumptionCache objects. More...
 
class  AssumptionPrinterPass
 Printer pass for the AssumptionAnalysis results. More...
 
class  AtomicCmpXchgInst
 An instruction that atomically checks whether a specified value is in a memory location, and, if it is, stores a new value there. More...
 
class  AtomicMemCpyInst
 This class represents the atomic memcpy intrinsic i.e. More...
 
class  AtomicMemIntrinsic
 
class  AtomicMemMoveInst
 This class represents the atomic memmove intrinsic i.e. More...
 
class  AtomicMemSetInst
 This class represents atomic memset intrinsic. More...
 
class  AtomicMemTransferInst
 
class  AtomicRMWInst
 an instruction that atomically reads a memory location, combines it with another value, and then stores the result back. More...
 
class  AttrBuilder
 
class  Attribute
 
class  AttributeImpl
 
class  AttributeList
 
class  AttributeListImpl
 
class  AttributeSet
 
class  AttributeSetNode
 
struct  Attributor
 } More...
 
struct  AttributorPass
 } More...
 
class  BasicAA
 Analysis pass providing a never-invalidated alias analysis result. More...
 
class  BasicAAResult
 This is the AA result object for the basic, local, and stateless alias analysis. More...
 
class  BasicAAWrapperPass
 Legacy wrapper pass to provide the BasicAAResult object. More...
 
class  BasicBlock
 LLVM Basic Block Representation. More...
 
class  BasicBlockEdge
 
class  BatchAAResults
 This class is a wrapper over an AAResults, and it is intended to be used only when there are no IR changes inbetween queries. More...
 
struct  BDCEPass
 
struct  BFIDOTGraphTraitsBase
 
class  BinaryByteStream
 An implementation of BinaryStream which holds its entire data set in a single contiguous buffer. More...
 
class  BinaryConstantExpr
 BinaryConstantExpr - This class is private to Constants.cpp, and is used behind the scenes to implement binary constant exprs. More...
 
class  BinaryItemStream
 BinaryItemStream represents a sequence of objects stored in some kind of external container but for which it is useful to view as a stream of contiguous bytes. More...
 
struct  BinaryItemTraits
 
struct  BinaryItemTraits< codeview::CVSymbol >
 
struct  BinaryItemTraits< llvm::codeview::CVType >
 
class  BinaryOperator
 
class  BinaryOpIntrinsic
 This class represents an intrinsic that is based on a binary operation. More...
 
class  BinaryStream
 An interface for accessing data in a stream-like format, but which discourages copying. More...
 
class  BinaryStreamError
 Base class for errors originating when parsing raw PDB files. More...
 
class  BinaryStreamReader
 Provides read only access to a subclass of BinaryStream. More...
 
class  BinaryStreamRef
 BinaryStreamRef is to BinaryStream what ArrayRef is to an Array. More...
 
class  BinaryStreamRefBase
 Common stuff for mutable and immutable StreamRefs. More...
 
class  BinaryStreamWriter
 Provides write only access to a subclass of WritableBinaryStream. More...
 
struct  BinarySubstreamRef
 
class  BitCastInst
 This class represents a no-op cast from one type to another. More...
 
class  BitCastOperator
 
class  BlockAddress
 The address of a basic block. More...
 
class  BlockFrequency
 
class  BlockFrequencyAnalysis
 Analysis pass which computes BlockFrequencyInfo. More...
 
class  BlockFrequencyInfo
 BlockFrequencyInfo pass uses BlockFrequencyInfoImpl implementation to estimate IR basic block frequencies. More...
 
class  BlockFrequencyInfoImpl
 Shared implementation for block frequency analysis. More...
 
class  BlockFrequencyInfoImplBase
 Base class for BlockFrequencyInfoImpl. More...
 
class  BlockFrequencyInfoWrapperPass
 Legacy analysis pass which computes BlockFrequencyInfo. More...
 
class  BlockFrequencyPrinterPass
 Printer pass for the BlockFrequencyInfo results. More...
 
class  BlotMapVector
 An associative container with fast insertion-order (deterministic) iteration over its elements. More...
 
struct  BooleanState
 Simple wrapper for a single bit (boolean) state. More...
 
struct  BoundsCheckingPass
 A pass to instrument code and perform run-time bounds checking on loads, stores, and other memory intrinsics. More...
 
struct  BPIPassTrait
 Simple trait class that provides a mapping between BPI passes and the corresponding BPInfo. More...
 
struct  BPIPassTrait< LazyBranchProbabilityInfoPass >
 
class  BranchInst
 Conditional or Unconditional Branch instruction. More...
 
class  BranchProbability
 
class  BranchProbabilityAnalysis
 Analysis pass which computes BranchProbabilityInfo. More...
 
class  BranchProbabilityInfo
 Analysis providing branch probability information. More...
 
class  BranchProbabilityInfoWrapperPass
 Legacy analysis pass which computes BranchProbabilityInfo. More...
 
class  BranchProbabilityPrinterPass
 Printer pass for the BranchProbabilityAnalysis results. More...
 
struct  BreakCriticalEdgesPass
 
class  buffer_ostream
 
class  BumpPtrAllocatorImpl
 Allocate memory in an ever growing pool, as if by bump-pointer. More...
 
struct  CachePruningPolicy
 Policy for the pruneCache() function. More...
 
class  CallbackVH
 Value handle with callbacks on RAUW and destruction. More...
 
class  CallBase
 Base class for all callable instructions (InvokeInst and CallInst) Holds everything related to calling a function. More...
 
class  CallBrInst
 CallBr instruction, tracking function calls that may not return control but instead transfer it to a third location. More...
 
class  CalledValuePropagationPass
 
struct  CalleeInfo
 Class to accumulate and hold information about a callee. More...
 
class  CallGraph
 The basic data container for the call graph of a Module of IR. More...
 
class  CallGraphAnalysis
 An analysis pass to compute the CallGraph for a Module. More...
 
class  CallGraphNode
 A node in the call graph for a module. More...
 
class  CallGraphPrinterPass
 Printer pass for the CallGraphAnalysis results. More...
 
class  CallGraphSCC
 CallGraphSCC - This is a single SCC that a CallGraphSCCPass is run on. More...
 
class  CallGraphSCCPass
 
class  CallGraphWrapperPass
 The ModulePass which wraps up a CallGraph and the logic to build it. More...
 
class  CallInfo
 
class  CallInst
 This class represents a function call, abstracting a target machine's calling convention. More...
 
class  CallSite
 
class  CallSiteBase
 
struct  CallSiteSplittingPass
 
class  CanonicalizeAliasesPass
 Simple pass that canonicalizes aliases. More...
 
struct  CaptureTracker
 This callback is used in conjunction with PointerMayBeCaptured. More...
 
struct  cast_convert_val
 
struct  cast_convert_val< To, FromTy, FromTy >
 
struct  cast_retty
 
struct  cast_retty_impl
 
struct  cast_retty_impl< To, const From * >
 
struct  cast_retty_impl< To, const From *const >
 
struct  cast_retty_impl< To, const From >
 
struct  cast_retty_impl< To, From * >
 
struct  cast_retty_impl< To, std::unique_ptr< From > >
 
struct  cast_retty_wrap
 
struct  cast_retty_wrap< To, FromTy, FromTy >
 
class  CastInst
 This is the base class for all instructions that perform data casts. More...
 
class  CatchPadInst
 
class  CatchReturnInst
 
class  CatchSwitchInst
 
class  CFGAnalyses
 Represents analyses that only rely on functions' control flow. More...
 
class  CFGMST
 An union-find based Minimum Spanning Tree for CFG. More...
 
class  CFGOnlyPrinterPass
 
class  CFGOnlyViewerPass
 
class  CFGPrinterPass
 
class  CFGViewerPass
 
struct  CFGViewPredecessors
 
struct  CFGViewSuccessors
 
class  CFLAndersAA
 Analysis pass providing a never-invalidated alias analysis result. More...
 
class  CFLAndersAAResult
 
class  CFLAndersAAWrapperPass
 Legacy wrapper pass to provide the CFLAndersAAResult object. More...
 
class  CFLSteensAA
 Analysis pass providing a never-invalidated alias analysis result. More...
 
class  CFLSteensAAResult
 
class  CFLSteensAAWrapperPass
 Legacy wrapper pass to provide the CFLSteensAAResult object. More...
 
class  CGProfilePass
 
class  CGSCCToFunctionPassAdaptor
 Adaptor that maps from a SCC to its functions. More...
 
struct  CGSCCUpdateResult
 Support structure for SCC passes to communicate updates the call graph back to the CGSCC pass manager infrsatructure. More...
 
struct  CHIArg
 
class  circular_raw_ostream
 circular_raw_ostream - A raw_ostream which can save its data to a circular buffer, or can pass it through directly to an underlying stream if specified with a buffer of zero. More...
 
class  CleanupPadInst
 
class  CleanupReturnInst
 
struct  ClonedCodeInfo
 This struct can be used to capture information about code being cloned, while it is being cloned. More...
 
class  CmpInst
 This class is the base class for the comparison instructions. More...
 
class  CodeExtractor
 Utility class for extracting code into a new function. More...
 
class  CodeGenCoverage
 
struct  CodeMetrics
 Utility to calculate the size and a few similar metrics for a set of basic blocks. More...
 
class  Comdat
 
struct  CommonHandleTraits
 
class  CompareConstantExpr
 
class  CompositeType
 Common super class of ArrayType, StructType and VectorType. More...
 
class  ConcreteOperator
 A helper template for defining operators for individual opcodes. More...
 
struct  const_pointer_or_const_ref
 
struct  const_pointer_or_const_ref< T, typename std::enable_if< std::is_pointer< T >::value >::type >
 
class  Constant
 This is an important base class in LLVM. More...
 
class  ConstantAggregate
 Base class for aggregate constants (with operands). More...
 
class  ConstantAggregateZero
 All zero aggregate value. More...
 
struct  ConstantAggrKeyType
 
class  ConstantArray
 ConstantArray - Constant Array Declarations. More...
 
class  ConstantAsMetadata
 
class  ConstantData
 Base class for constants with no operands. More...
 
class  ConstantDataArray
 An array constant whose element type is a simple 1/2/4/8-byte integer or float/double, and whose elements are just simple data values (i.e. More...
 
struct  ConstantDataArraySlice
 Represents offset+length into a ConstantDataArray. More...
 
class  ConstantDataSequential
 ConstantDataSequential - A vector or array constant whose element type is a simple 1/2/4/8-byte integer or float/double, and whose elements are just simple data values (i.e. More...
 
class  ConstantDataVector
 A vector constant whose element type is a simple 1/2/4/8-byte integer or float/double, and whose elements are just simple data values (i.e. More...
 
class  ConstantExpr
 A constant value that is initialized with an expression using other constant values. More...
 
struct  ConstantExprKeyType
 
class  ConstantFolder
 ConstantFolder - Create constants with minimum, target independent, folding. More...
 
class  ConstantFP
 ConstantFP - Floating Point Values [float, double]. More...
 
class  ConstantHoistingPass
 
struct  ConstantInfo
 
struct  ConstantInfo< ConstantArray >
 
struct  ConstantInfo< ConstantExpr >
 
struct  ConstantInfo< ConstantStruct >
 
struct  ConstantInfo< ConstantVector >
 
struct  ConstantInfo< InlineAsm >
 
class  ConstantInt
 This is the shared class of boolean and integer constants. More...
 
class  ConstantMergePass
 A pass that merges duplicate global constants into a single constant. More...
 
class  ConstantPointerNull
 A constant pointer value that points to null. More...
 
class  ConstantRange
 This class represents a range of values. More...
 
class  ConstantStruct
 
class  ConstantTokenNone
 A constant token which is empty. More...
 
class  ConstantUniqueMap
 
class  ConstantVector
 Constant Vector Declarations. More...
 
class  ConstrainedFPIntrinsic
 This is the common base class for constrained floating point intrinsics. More...
 
class  ContextAndReplaceableUses
 Pointer to the context, with optional RAUW support. More...
 
class  ControlHeightReductionPass
 
class  CoroAllocInst
 This represents the llvm.coro.alloc instruction. More...
 
class  CoroBeginInst
 This class represents the llvm.coro.begin instruction. More...
 
class  CoroEndInst
 This represents the llvm.coro.end instruction. More...
 
class  CoroFrameInst
 This represents the llvm.coro.frame instruction. More...
 
class  CoroFreeInst
 This represents the llvm.coro.free instruction. More...
 
class  CoroIdInst
 This represents the llvm.coro.alloc instruction. More...
 
class  CoroPromiseInst
 This represents the llvm.coro.promise instruction. More...
 
class  CoroSaveInst
 This represents the llvm.coro.save instruction. More...
 
class  CoroSizeInst
 This represents the llvm.coro.size instruction. More...
 
class  CoroSubFnInst
 This class represents the llvm.coro.subfn.addr instruction. More...
 
class  CoroSuspendInst
 This represents the llvm.coro.suspend instruction. More...
 
struct  CorrelatedValuePropagationPass
 
class  CrashRecoveryContext
 Crash recovery helper object. More...
 
class  CrashRecoveryContextCleanup
 Abstract base class of cleanup handlers. More...
 
class  CrashRecoveryContextCleanupBase
 Base class of cleanup handler that controls recovery of resources of the given type. More...
 
class  CrashRecoveryContextCleanupRegistrar
 Helper class for managing resource cleanups. More...
 
class  CrashRecoveryContextDeleteCleanup
 Cleanup handler that reclaims resource by calling 'delete' on it. More...
 
class  CrashRecoveryContextDestructorCleanup
 Cleanup handler that reclaims resource by calling destructor on it. More...
 
class  CrashRecoveryContextReleaseRefCleanup
 Cleanup handler that reclaims resource by calling its method 'Release'. More...
 
struct  CriticalEdgeSplittingOptions
 Option class for critical edge splitting. More...
 
class  CrossDSOCFIPass
 
struct  CryptContextTraits
 
class  DataExtractor
 
class  DataLayout
 A parsed version of the target data layout string in and methods for querying it. More...
 
class  DbgAddrIntrinsic
 This represents the llvm.dbg.addr instruction. More...
 
class  DbgDeclareInst
 This represents the llvm.dbg.declare instruction. More...
 
class  DbgInfoIntrinsic
 This is the common base class for debug info intrinsics. More...
 
class  DbgLabelInst
 This represents the llvm.dbg.label instruction. More...
 
class  DbgValueInst
 This represents the llvm.dbg.value instruction. More...
 
class  DbgVariableIntrinsic
 This is the common base class for debug info intrinsics for variables. More...
 
class  DCEPass
 Basic Dead Code Elimination pass. More...
 
class  DeadArgumentEliminationPass
 Eliminate dead arguments (and return values) from functions. More...
 
class  DebugCounter
 
class  DebugInfoFinder
 Utility to find all debug info in a module. More...
 
class  DebugLoc
 A debug info location. More...
 
struct  decimalInfo
 
struct  def_chain_iterator
 Walks the defining accesses of MemoryDefs. More...
 
struct  DefaultAnalysisGraphTraits
 Default traits class for extracting a graph from an analysis pass. More...
 
struct  DefaultDOTGraphTraits
 DefaultDOTGraphTraits - This class provides the default implementations of all of the DOTGraphTraits methods. More...
 
struct  DelimitedScope
 
class  DemandedBits
 
class  DemandedBitsAnalysis
 An analysis that produces DemandedBits for a function. More...
 
class  DemandedBitsPrinterPass
 Printer pass for DemandedBits. More...
 
class  DemandedBitsWrapperPass
 
struct  DenseMapAPFloatKeyInfo
 
struct  DenseMapAPIntKeyInfo
 
struct  DenseMapInfo
 
struct  DenseMapInfo< AAMDNodes >
 
struct  DenseMapInfo< AssertingVH< T > >
 
struct  DenseMapInfo< AttributeList >
 
struct  DenseMapInfo< AttributeSet >
 
struct  DenseMapInfo< BasicBlockEdge >
 
struct  DenseMapInfo< CallSite >
 
struct  DenseMapInfo< CallValue >
 
struct  DenseMapInfo< cflaa::InstantiatedValue >
 
struct  DenseMapInfo< codeview::GloballyHashedType >
 
struct  DenseMapInfo< codeview::LocallyHashedType >
 
struct  DenseMapInfo< codeview::TypeIndex >
 
struct  DenseMapInfo< const Expression * >
 
struct  DenseMapInfo< DIExpression::FragmentInfo >
 
struct  DenseMapInfo< DivRemMapKey >
 
struct  DenseMapInfo< ExitLimitQuery >
 
struct  DenseMapInfo< FunctionSummary::ConstVCall >
 
struct  DenseMapInfo< FunctionSummary::VFuncId >
 
struct  DenseMapInfo< gsym::FileEntry >
 
struct  DenseMapInfo< GVN::Expression >
 
struct  DenseMapInfo< LLT >
 
struct  DenseMapInfo< LocationSize >
 
struct  DenseMapInfo< LoweredPHIRecord >
 
struct  DenseMapInfo< MemoryLocation >
 
struct  DenseMapInfo< MemoryLocOrCall >
 
struct  DenseMapInfo< OffsetInstantiatedValue >
 
struct  DenseMapInfo< OffsetValue >
 
struct  DenseMapInfo< PoisoningVH< T > >
 
struct  DenseMapInfo< SimpleValue >
 
struct  DenseMapInfo< ValueInfo >
 
struct  DenseMapInfo< ValueMapCallbackVH< KeyT, ValueT, Config > >
 
struct  DenseMapInfo< VTableSlot >
 
class  Dependence
 Dependence - This class represents a dependence between two memory memory references in a function. More...
 
class  DependenceAnalysis
 AnalysisPass to compute dependence information in a function. More...
 
struct  DependenceAnalysisPrinterPass
 Printer pass to dump DA results. More...
 
class  DependenceAnalysisWrapperPass
 Legacy pass manager pass to access dependence information. More...
 
class  DependenceInfo
 DependenceInfo - This class is the main dependence-analysis driver. More...
 
class  DerivedUser
 Extension point for the Value hierarchy. More...
 
struct  DescriptorInfo
 
struct  DevirtCallSite
 A call site that could be devirtualized. More...
 
class  DevirtSCCRepeatedPass
 A helper that repeats an SCC pass each time an indirect call is refined to a direct call by that pass. More...
 
class  DFCalculateWorkObject
 
struct  DiagnosticHandler
 This is the base class for diagnostic handling in LLVM. More...
 
class  DiagnosticInfo
 This is the base abstract class for diagnostic reporting in the backend. More...
 
class  DiagnosticInfoDebugMetadataVersion
 Diagnostic information for debug metadata version reporting. More...
 
class  DiagnosticInfoIgnoringInvalidDebugMetadata
 Diagnostic information for stripping invalid debug metadata. More...
 
class  DiagnosticInfoInlineAsm
 Diagnostic information for inline asm reporting. More...
 
class  DiagnosticInfoIROptimization
 Common features for diagnostics dealing with optimization remarks that are used by IR passes. More...
 
class  DiagnosticInfoISelFallback
 Diagnostic information for ISel fallback path. More...
 
class  DiagnosticInfoMIRParser
 Diagnostic information for machine IR parser. More...
 
class  DiagnosticInfoOptimizationBase
 Common features for diagnostics dealing with optimization remarks that are used by both IR and MIR passes. More...
 
class  DiagnosticInfoOptimizationFailure
 Diagnostic information for optimization failures. More...
 
class  DiagnosticInfoPGOProfile
 Diagnostic information for the PGO profiler. More...
 
class  DiagnosticInfoResourceLimit
 Diagnostic information for stack size etc. More...
 
class  DiagnosticInfoSampleProfile
 Diagnostic information for the sample profiler. More...
 
class  DiagnosticInfoStackSize
 
class  DiagnosticInfoUnsupported
 Diagnostic information for unsupported feature in backend. More...
 
class  DiagnosticInfoWithLocationBase
 Common features for diagnostics with an associated location. More...
 
class  DiagnosticLocation
 
class  DiagnosticPrinter
 Interface for custom diagnostic printing. More...
 
class  DiagnosticPrinterRawOStream
 Basic diagnostic printer that uses an underlying raw_ostream. More...
 
class  DIBasicType
 Basic type, like 'int' or 'float'. More...
 
class  DIBuilder
 
class  DICommonBlock
 
class  DICompileUnit
 Compile unit. More...
 
class  DICompositeType
 Composite types. More...
 
class  DIContext
 
class  DIDerivedType
 Derived types. More...
 
struct  DIDumpOptions
 Container for dump options that control which debug information will be dumped. More...
 
class  DIEnumerator
 Enumeration value. More...
 
class  DIExpression
 DWARF expression. More...
 
class  DIFile
 File. More...
 
struct  DIGlobal
 Container for description of a global variable. More...
 
class  DIGlobalVariable
 Global variables. More...
 
class  DIGlobalVariableExpression
 A pair of DIGlobalVariable and DIExpression. More...
 
class  DIImportedEntity
 An imported module (C++ using directive or similar). More...
 
class  DIInliningInfo
 A format-neutral container for inlined code description. More...
 
class  DILabel
 Label. More...
 
class  DILexicalBlock
 
class  DILexicalBlockBase
 
class  DILexicalBlockFile
 
struct  DILineInfo
 A format-neutral container for source line information. More...
 
struct  DILineInfoSpecifier
 Controls which fields of DILineInfo container should be filled with data. More...
 
struct  DILocal
 
class  DILocalScope
 A scope for locals. More...
 
class  DILocalVariable
 Local variable. More...
 
class  DILocation
 Debug location. More...
 
class  DIMacro
 
class  DIMacroFile
 
class  DIMacroNode
 Macro Info DWARF-like metadata node. More...
 
class  DIModule
 A (clang) module that has been imported by the compile unit. More...
 
class  DINamespace
 
class  DINode
 Tagged DWARF-like metadata node. More...
 
class  DIObjCProperty
 
class  DIScope
 Base class for scope-like contexts. More...
 
class  DistinctMDOperandPlaceholder
 Placeholder metadata for operands of distinct MDNodes. More...
 
class  DISubprogram
 Subprogram description. More...
 
class  DISubrange
 Array subrange. More...
 
class  DISubroutineType
 Type array for a subprogram. More...
 
class  DITemplateParameter
 Base class for template parameters. More...
 
class  DITemplateTypeParameter
 
class  DITemplateValueParameter
 
class  DIType
 Base class for types. More...
 
class  DITypeRefArray
 
class  DIVariable
 Base class for variables. More...
 
class  DivergenceAnalysis
 Generic divergence analysis for reducible CFGs. More...
 
struct  DivergencePropagator
 
struct  DivRemMapKey
 
struct  DivRemPairsPass
 Hoist/decompose integer division and remainder instructions to enable CFG improvements and better codegen. More...
 
class  DominanceFrontier
 
class  DominanceFrontierAnalysis
 Analysis pass which computes a DominanceFrontier. More...
 
class  DominanceFrontierBase
 DominanceFrontierBase - Common base class for computing forward and inverse dominance frontiers for a function. More...
 
class  DominanceFrontierPrinterPass
 Printer pass for the DominanceFrontier. More...
 
class  DominanceFrontierWrapperPass
 
class  DominatorTree
 Concrete subclass of DominatorTreeBase that is used to compute a normal dominator tree. More...
 
class  DominatorTreeAnalysis
 Analysis pass which computes a DominatorTree. More...
 
class  DominatorTreeBase
 Core dominator tree base class. More...
 
class  DominatorTreePrinterPass
 Printer pass for the DominatorTree. More...
 
struct  DominatorTreeVerifierPass
 Verifier pass for the DominatorTree. More...
 
class  DominatorTreeWrapperPass
 Legacy analysis pass which computes a DominatorTree. More...
 
struct  DomTreeGraphTraitsBase
 
class  DomTreeNodeBase
 Base class for the actual dominator tree node. More...
 
class  DomTreeUpdater
 
class  DoNothingMemorySSAWalker
 A MemorySSAWalker that does no alias queries, or anything else. More...
 
struct  DOTGraphTraits
 DOTGraphTraits - Template class that can be specialized to customize how graphs are converted to 'dot' graphs. More...
 
struct  DOTGraphTraits< BlockFrequencyInfo * >
 
struct  DOTGraphTraits< BoUpSLP * >
 
struct  DOTGraphTraits< CallGraph * >
 
struct  DOTGraphTraits< const Function * >
 
struct  DOTGraphTraits< DominatorTree * >
 
struct  DOTGraphTraits< DomTreeNode * >
 
struct  DOTGraphTraits< PGOUseFunc * >
 
struct  DOTGraphTraits< PostDominatorTree * >
 
struct  DOTGraphTraits< RegionInfo * >
 
struct  DOTGraphTraits< RegionNode * >
 
class  DOTGraphTraitsModulePrinter
 
class  DOTGraphTraitsModuleViewer
 
class  DOTGraphTraitsPrinter
 
class  DOTGraphTraitsViewer
 
class  DSEPass
 This class implements a trivial dead store elimination. More...
 
class  DummyCGSCCPass
 This pass is required by interprocedural register allocation. More...
 
class  DWARFAbbreviationDeclaration
 
class  DWARFAbbreviationDeclarationSet
 
class  DWARFAcceleratorTable
 The accelerator tables are designed to allow efficient random access (using a symbol name as a key) into debug info by providing an index of the debug info DIEs. More...
 
struct  DWARFAddressRange
 
struct  DWARFAttribute
 Encapsulates a DWARF attribute value and all of the data required to describe the attribute value. More...
 
class  DWARFCompileUnit
 
class  DWARFContext
 DWARFContext This data structure is the top level entity that deals with dwarf debug information parsing. More...
 
class  DWARFDataExtractor
 A DataExtractor (typically for an in-memory copy of an object-file section) plus a relocation map for that section, if there is one. More...
 
class  DWARFDebugAbbrev
 
class  DWARFDebugAddrTable
 A class representing an address table as specified in DWARF v5. More...
 
class  DWARFDebugAranges
 
class  DWARFDebugArangeSet
 
class  DWARFDebugFrame
 A parsed .debug_frame or .eh_frame section. More...
 
class  DWARFDebugInfoEntry
 DWARFDebugInfoEntry - A DIE with only the minimum required data. More...
 
class  DWARFDebugLine
 
class  DWARFDebugLoc
 
class  DWARFDebugLoclists
 
class  DWARFDebugMacro
 
class  DWARFDebugNames
 .debug_names section consists of one or more units. More...
 
class  DWARFDebugPubTable
 Represents structure for holding and parsing .debug_pub* tables. More...
 
class  DWARFDebugRangeList
 
class  DWARFDebugRnglist
 A class representing a single rangelist. More...
 
class  DWARFDebugRnglistTable
 
class  DWARFDie
 Utility class that carries the DWARF compile/type unit and the debug info entry in an object. More...
 
class  DWARFExpression
 
class  DWARFFormValue
 
class  DWARFGdbIndex
 
struct  DWARFListEntryBase
 A base class for DWARF list entries, such as range or location list entries. More...
 
class  DWARFListTableBase
 A class representing a table of lists as specified in the DWARF v5 standard for location lists and range lists. More...
 
class  DWARFListTableHeader
 A class representing the header of a list table such as the range list table in the .debug_rnglists section. More...
 
class  DWARFListType
 A base class for lists of entries that are extracted from a particular section, such as range lists or location lists. More...
 
class  DWARFObject
 
struct  DWARFSection
 
class  DWARFTypeUnit
 
class  DWARFUnit
 
class  DWARFUnitHeader
 Base class describing the header of any kind of "unit." Some information is specific to certain unit types. More...
 
class  DWARFUnitIndex
 
class  DWARFUnitVector
 Describe a collection of units. More...
 
class  DWARFVerifier
 A class that verifies DWARF debug information given a DWARF Context. More...
 
struct  EarlyCSEPass
 A simple and fast domtree-based CSE pass. More...
 
class  ECError
 This class wraps a std::error_code in a Error. More...
 
class  ElementCount
 
class  EliminateAvailableExternallyPass
 A pass that transforms external global definitions into declarations. More...
 
struct  Entry
 
struct  EntryExitInstrumenterPass
 
class  EnumAttributeImpl
 
struct  EnumEntry
 
class  Error
 Lightweight error class with error context and mandatory checking. More...
 
class  ErrorAsOutParameter
 Helper for Errors used as out-parameters. More...
 
class  ErrorHandlerTraits
 Helper for testing applicability of, and applying, handlers for ErrorInfo types. More...
 
class  ErrorHandlerTraits< Error(&)(ErrT &)>
 
class  ErrorHandlerTraits< Error(&)(std::unique_ptr< ErrT >)>
 Specialization for functions of the form 'Error (std::unique_ptr<ErrT>)'. More...
 
class  ErrorHandlerTraits< RetT(C::*)(const ErrT &) const >
 
class  ErrorHandlerTraits< RetT(C::*)(const ErrT &)>
 
class  ErrorHandlerTraits< RetT(C::*)(ErrT &) const >
 
class  ErrorHandlerTraits< RetT(C::*)(ErrT &)>
 
class  ErrorHandlerTraits< RetT(C::*)(std::unique_ptr< ErrT >) const >
 Specialization for member functions of the form 'RetT (std::unique_ptr<ErrT>) const'. More...
 
class  ErrorHandlerTraits< RetT(C::*)(std::unique_ptr< ErrT >)>
 Specialization for member functions of the form 'RetT (std::unique_ptr<ErrT>)'. More...
 
class  ErrorHandlerTraits< void(&)(ErrT &)>
 
class  ErrorHandlerTraits< void(&)(std::unique_ptr< ErrT >)>
 Specialization for functions of the form 'void (std::unique_ptr<ErrT>)'. More...
 
class  ErrorInfo
 Base class for user error types. More...
 
class  ErrorInfoBase
 Base class for error info classes. More...
 
class  ErrorList
 Special ErrorInfo subclass representing a list of ErrorInfos. More...
 
class  ErrorOr
 Represents either an error or a value T. More...
 
class  ErrorSuccess
 Subclass of Error for the sole purpose of identifying the success path in the type system. More...
 
class  EscapeEnumerator
 EscapeEnumerator - This is a little algorithm to find all escape points from a function so that "finally"-style code can be inserted. More...
 
class  Evaluator
 This class evaluates LLVM IR, producing the Constant representing each SSA instruction. More...
 
struct  ExactEqualsExpression
 
struct  ExitLimitQuery
 
class  ExitOnError
 Helper for check-and-exit error handling. More...
 
class  Expected
 Tagged union holding either a T or a Error. More...
 
class  ExpectedAsOutParameter
 Helper for Expected<T>s used as out-parameters. More...
 
struct  ExternalAAWrapperPass
 A wrapper pass for external alias analyses. More...
 
class  ExtractElementConstantExpr
 ExtractElementConstantExpr - This class is private to Constants.cpp, and is used behind the scenes to implement extractelement constant exprs. More...
 
class  ExtractElementInst
 This instruction extracts a single (scalar) element from a VectorType value. More...
 
class  ExtractValueConstantExpr
 ExtractValueConstantExpr - This class is private to Constants.cpp, and is used behind the scenes to implement extractvalue constant exprs. More...
 
class  ExtractValueInst
 This instruction extracts a struct member or array element value from an aggregate value. More...
 
class  FastMathFlags
 Convenience struct for specifying and reasoning about fast-math flags. More...
 
class  FCmpInst
 This instruction compares its operands according to the predicate given to the constructor. More...
 
class  FenceInst
 An instruction for ordering other memory operations. More...
 
class  FileBufferByteStream
 An implementation of WritableBinaryStream backed by an llvm FileOutputBuffer. More...
 
class  FileCheck
 FileCheck class takes the request and exposes various methods that use information from the request. More...
 
class  FileCheckASTBinop
 Class representing a single binary operation in the AST of an expression. More...
 
struct  FileCheckDiag
 Summary of a FileCheck diagnostic. More...
 
class  FileCheckErrorDiagnostic
 Class to represent an error holding a diagnostic with location information used when printing it. More...
 
class  FileCheckExpressionAST
 Base class representing the AST of a given expression. More...
 
class  FileCheckExpressionLiteral
 Class representing an unsigned literal in the AST of an expression. More...
 
class  FileCheckNotFoundError
 
class  FileCheckNumericSubstitution
 
class  FileCheckNumericVariable
 Class representing a numeric variable and its associated current value. More...
 
class  FileCheckNumericVariableUse
 Class representing the use of a numeric variable in the AST of an expression. More...
 
class  FileCheckPattern
 
class  FileCheckPatternContext
 Class holding the FileCheckPattern global state, shared by all patterns: tables holding values of variables and whether they are defined or not at any given time in the matching process. More...
 
struct  FileCheckRequest
 Contains info about various FileCheck options. More...
 
struct  FileCheckString
 A check that we found in the input file. More...
 
class  FileCheckStringSubstitution
 
class  FileCheckSubstitution
 Class representing a substitution to perform in the RegExStr string. More...
 
class  FileCheckUndefVarError
 Class to represent an undefined variable error, which quotes that variable's name when printed. More...
 
class  FileError
 This class wraps a filename and another Error. More...
 
struct  FileHandleTraits
 
class  FileOutputBuffer
 FileOutputBuffer - This interface provides simple way to create an in-memory buffer which will be written to a file. More...
 
class  FileRemover
 FileRemover - This class is a simple object meant to be stack allocated. More...
 
class  FilteredPassNameParser
 ===-------------------------------------------------------------------—===// FilteredPassNameParser class - Make use of the pass registration mechanism to automatically add a command line argument to opt for each pass that satisfies a filter criteria. More...
 
struct  FindHandleTraits
 
struct  FixedNumOperandTraits
 FixedNumOperandTraits - determine the allocation regime of the Use array when it is a prefix to the User object, and the number of Use objects is known at compile time. More...
 
class  FixedStreamArray
 FixedStreamArray is similar to VarStreamArray, except with each record having a fixed-length. More...
 
class  FixedStreamArrayIterator
 
class  FlatIt
 Marker class to iterate over the elements of a Region in flat mode. More...
 
class  Float2IntPass
 
struct  fltSemantics
 
struct  FmtAlign
 
struct  FoldingSetTrait< SCEV >
 
struct  FoldingSetTrait< SCEVPredicate >
 
struct  ForceFunctionAttrsPass
 Pass which forces specific function attributes into the IR, primarily as a debugging tool. More...
 
class  format_object
 
class  format_object_base
 This is a helper class used for handling formatted output. More...
 
struct  format_provider
 
struct  format_provider< bool >
 Implementation of format_provider<T> for type bool More...
 
struct  format_provider< codeview::GloballyHashedType >
 
struct  format_provider< codeview::GUID >
 
struct  format_provider< codeview::LocallyHashedType >
 
struct  format_provider< codeview::TypeIndex >
 
class  format_provider< llvm::iterator_range< IterT > >
 Implementation of format_provider<T> for ranges. More...
 
struct  format_provider< llvm::json::Value >
 Allow printing json::Value with formatv(). More...
 
struct  format_provider< pdb::PdbRaw_ImplVer >
 
struct  format_provider< std::chrono::duration< Rep, Period > >
 
struct  format_provider< sys::TimePoint<> >
 Format provider for TimePoint<> More...
 
struct  format_provider< T, typename std::enable_if< detail::use_char_formatter< T >::value >::type >
 Implementation of format_provider<T> for characters. More...
 
struct  format_provider< T, typename std::enable_if< detail::use_double_formatter< T >::value >::type >
 Implementation of format_provider<T> for floating point types. More...
 
struct  format_provider< T, typename std::enable_if< detail::use_integral_formatter< T >::value >::type >
 Implementation of format_provider<T> for integral arithmetic types. More...
 
struct  format_provider< T, typename std::enable_if< detail::use_pointer_formatter< T >::value >::type >
 Implementation of format_provider<T> for integral pointer types. More...
 
struct  format_provider< T, typename std::enable_if< detail::use_string_formatter< T >::value >::type >
 Implementation of format_provider<T> for c-style strings and string objects such as std::string and llvm::StringRef. More...
 
struct  format_provider< Twine >
 Implementation of format_provider<T> for llvm::Twine. More...
 
class  FormatAdapter
 
class  formatted_raw_ostream
 formatted_raw_ostream - A raw_ostream that wraps another one and keeps track of line and column position, allowing padding out to specific column boundaries and querying the number of lines written to the stream. More...
 
class  FormattedBytes
 
class  FormattedNumber
 This is a helper class used for format_hex() and format_decimal(). More...
 
class  FormattedString
 This is a helper class for left_justify, right_justify, and center_justify. More...
 
class  formatv_object
 
class  formatv_object_base
 
class  FortifiedLibCallSimplifier
 This class implements simplifications for calls to fortified library functions (__st*cpy_chk, __memcpy_chk, __memmove_chk, __memset_chk), to, when possible, replace them with their non-checking counterparts. More...
 
class  ForwardDominanceFrontierBase
 DominanceFrontier Class - Concrete subclass of DominanceFrontierBase that is used to compute a forward dominator frontiers. More...
 
class  FPExtInst
 This class represents an extension of floating point types. More...
 
class  FPMathOperator
 Utility class for floating point operations which can have information about relaxed accuracy requirements attached to them. More...
 
class  FPPassManager
 FPPassManager manages BBPassManagers and FunctionPasses. More...
 
class  FPToSIInst
 This class represents a cast from floating point to signed integer. More...
 
class  FPToUIInst
 This class represents a cast from floating point to unsigned integer. More...
 
class  FPTruncInst
 This class represents a truncation of floating point types. More...
 
class  FullDependence
 FullDependence - This class represents a dependence between two memory references in a function. More...
 
class  FuncletPadInst
 
class  Function
 
class  FunctionAnalysisManagerCGSCCProxy
 A proxy from a FunctionAnalysisManager to an SCC. More...
 
class  FunctionCallee
 A handy container for a FunctionType+Callee-pointer pair, which can be passed around as a single entity. More...
 
class  FunctionComparator
 FunctionComparator - Compares two functions to determine whether or not they will generate machine code with the same behaviour. More...
 
class  FunctionImporter
 The function importer is automatically importing function from other modules based on the provided summary informations. More...
 
class  FunctionImportGlobalProcessing
 Class to handle necessary GlobalValue changes required by ThinLTO function importing, including linkage changes and any necessary renaming. More...
 
class  FunctionImportPass
 The function importing pass. More...
 
struct  FunctionPointerLikeTypeTraits
 Provide suitable custom traits struct for function pointers. More...
 
class  FunctionSummary
 Function summary information to aid decisions and implementation of importing. More...
 
class  FunctionToLoopPassAdaptor
 Adaptor that maps from a function to its loops. More...
 
class  FunctionType
 Class to represent function types. More...
 
struct  FunctionTypeKeyInfo
 
struct  GCOVOptions
 
class  GCOVProfilerPass
 The gcov-style instrumentation pass. More...
 
class  GCProjectionInst
 Common base class for representing values projected from a statepoint. More...
 
class  GCRelocateInst
 Represents calls to the gc.relocate intrinsic. More...
 
class  GCResultInst
 Represents calls to the gc.result intrinsic. More...
 
class  generic_gep_type_iterator
 
class  GenericDINode
 Generic tagged DWARF-like metadata node. More...
 
class  GEPOperator
 
class  GetElementPtrConstantExpr
 GetElementPtrConstantExpr - This class is private to Constants.cpp, and is used behind the scenes to implement getelementpr constant exprs. More...
 
class  GetElementPtrInst
 an instruction for type-safe pointer arithmetic to access elements of arrays and structs More...
 
class  GlobalAlias
 
class  GlobalDCEPass
 Pass to remove unused function declarations. More...
 
class  GlobalIFunc
 
class  GlobalIndirectSymbol
 
class  GlobalNumberState
 GlobalNumberState assigns an integer to each global value in the program, which is used by the comparison routine to order references to globals. More...
 
class  GlobalObject
 
class  GlobalOptPass
 Optimize globals that never have their address taken. More...
 
class  GlobalsAA
 Analysis pass providing a never-invalidated alias analysis result. More...
 
class  GlobalsAAResult
 An alias analysis result set for globals. More...
 
class  GlobalsAAWrapperPass
 Legacy wrapper pass to provide the GlobalsAAResult object. More...
 
class  GlobalsMetadata
 Frontend-provided metadata for global variables. More...
 
class  GlobalSplitPass
 Pass to perform split of global variables. More...
 
struct  GlobalStatus
 As we analyze each global, keep track of some information about it. More...
 
class  GlobalValue
 
class  GlobalValueSummary
 Function and variable summary information to aid decisions and implementation of importing. More...
 
struct  GlobalValueSummaryInfo
 
class  GlobalVariable
 
class  GlobalVarSummary
 Global variable summary information to aid decisions and implementation of importing. More...
 
class  GlobPattern
 
class  GPUDivergenceAnalysis
 Divergence analysis frontend for GPU kernels. More...
 
class  GraphDiff
 
struct  GraphTraits
 
struct  GraphTraits< ArgumentGraph * >
 
struct  GraphTraits< ArgumentGraphNode * >
 
struct  GraphTraits< BasicBlock * >
 
struct  GraphTraits< BlockFrequencyInfo * >
 
struct  GraphTraits< BoUpSLP * >
 
struct  GraphTraits< CallGraph * >
 
struct  GraphTraits< CallGraphNode * >
 
struct  GraphTraits< const BasicBlock * >
 
struct  GraphTraits< const CallGraph * >
 
struct  GraphTraits< const CallGraphNode * >
 
struct  GraphTraits< const DomTreeNode * >
 
struct  GraphTraits< const Function * >
 
struct  GraphTraits< const Loop * >
 
struct  GraphTraits< const VPBlockBase * >
 
struct  GraphTraits< const VPDomTreeNode * >
 
struct  GraphTraits< const VPRegionBlock * >
 
struct  GraphTraits< DominatorTree * >
 
struct  GraphTraits< DomTreeNode * >
 
struct  GraphTraits< Function * >
 
struct  GraphTraits< Interval * >
 
struct  GraphTraits< Inverse< BasicBlock * > >
 
struct  GraphTraits< Inverse< const BasicBlock * > >
 
struct  GraphTraits< Inverse< const Function * > >
 
struct  GraphTraits< Inverse< Function * > >
 
struct  GraphTraits< Inverse< Interval * > >
 
struct  GraphTraits< Inverse< MemoryAccess * > >
 
struct  GraphTraits< Inverse< VPBlockBase * > >
 
struct  GraphTraits< Inverse< VPRegionBlock * > >
 
struct  GraphTraits< IrreducibleGraph >
 
struct  GraphTraits< LazyCallGraph * >
 
struct  GraphTraits< LazyCallGraph::Node * >
 
struct  GraphTraits< Loop * >
 
struct  GraphTraits< MemoryAccess * >
 GraphTraits for a MemoryAccess, which walks defs in the normal case, and uses in the inverse case. More...
 
struct  GraphTraits< ModuleSummaryIndex * >
 
struct  GraphTraits< PGOUseFunc * >
 
struct  GraphTraits< PostDominatorTree * >
 
struct  GraphTraits< RegionInfo * >
 
struct  GraphTraits< RegionInfoPass * >
 
struct  GraphTraits< std::pair< const GraphDiff< BasicBlock *, false > *, BasicBlock * > >
 
struct  GraphTraits< std::pair< const GraphDiff< BasicBlock *, false > *, Inverse< BasicBlock * > > >
 
struct  GraphTraits< std::pair< const GraphDiff< BasicBlock *, true > *, BasicBlock * > >
 
struct  GraphTraits< std::pair< const GraphDiff< BasicBlock *, true > *, Inverse< BasicBlock * > > >
 
struct  GraphTraits< ValueInfo >
 GraphTraits definition to build SCC for the index. More...
 
struct  GraphTraits< VPBlockBase * >
 
struct  GraphTraits< VPDomTreeNode * >
 Template specializations of GraphTraits for VPDomTreeNode. More...
 
struct  GraphTraits< VPRegionBlock * >
 
class  GraphWriter
 
struct  GuardWideningPass
 
class  GVMaterializer
 
class  GVN
 The core GVN pass object. More...
 
class  GVNHoist
 
class  GVNHoistLegacyPass
 
struct  GVNHoistPass
 A simple and fast domtree-based GVN pass to hoist common expressions from sibling branches. More...
 
struct  GVNSinkPass
 Uses an "inverted" value numbering to decide the similarity of expressions and sinks similar expressions into successors. More...
 
struct  HardwareLoopInfo
 Attributes of a target dependent hardware loop. More...
 
struct  HexNumber
 
class  HotColdSplittingPass
 Pass to outline cold regions. More...
 
struct  HungoffOperandTraits
 HungoffOperandTraits - determine the allocation regime of the Use array when it is not a prefix to the User object, but allocated at an unrelated heap address. More...
 
class  HWAddressSanitizerPass
 This is a public interface to the hardware address sanitizer pass for instrumenting code to check for various memory errors at runtime, similar to AddressSanitizer but based on partial hardware assistance. More...
 
class  ICallPromotionAnalysis
 
class  ICFLoopSafetyInfo
 This implementation of LoopSafetyInfo use ImplicitControlFlowTracking to give precise answers on "may throw" queries. More...
 
class  ICmpInst
 This instruction compares its operands according to the predicate given to the constructor. More...
 
class  IDFCalculator
 
class  IDFCalculatorBase
 Determine the iterated dominance frontier, given a set of defining blocks, and optionally, a set of live-in blocks. More...
 
struct  ilist_alloc_traits< Instruction >
 
struct  ilist_alloc_traits< MemoryAccess >
 
class  ImmutableCallSite
 Establish a view to a call site for examination. More...
 
class  ImmutableStatepoint
 A specialization of it's base class for read only access to a gc.statepoint. More...
 
class  ImplicitControlFlowTracking
 This class allows to keep track on instructions with implicit control flow. More...
 
class  ImportedFunctionsInliningStatistics
 Calculate and dump ThinLTO specific inliner stats. More...
 
class  IndirectBrInst
 Indirect Branch Instruction. More...
 
class  InductionDescriptor
 A struct for saving information about induction variables. More...
 
class  IndVarSimplifyPass
 
struct  InferFunctionAttrsPass
 A pass which infers function attributes from the names and signatures of function declarations in a module. More...
 
struct  InformationCache
 Data structure to hold cached (LLVM-IR) information. More...
 
class  InitLLVM
 
class  InlineAsm
 
struct  InlineAsmKeyType
 
class  InlineCost
 Represents the cost of inlining a function. More...
 
class  InlineFunctionInfo
 This class captures the data input to the InlineFunction call, and records the auxiliary results produced by it. More...
 
struct  InlineParams
 Thresholds to tune inline cost analysis. More...
 
struct  InlineResult
 InlineResult is basically true or false. More...
 
class  InlinerPass
 The inliner pass for the new pass manager. More...
 
class  InnerAnalysisManagerProxy
 An analysis over an "outer" IR unit that provides access to an analysis manager over an "inner" IR unit. More...
 
class  InnerLoopUnroller
 
class  InnerLoopVectorizer
 InnerLoopVectorizer vectorizes loops which contain only one basic block to a specified vectorization factor (VF). More...
 
class  InsertElementConstantExpr
 InsertElementConstantExpr - This class is private to Constants.cpp, and is used behind the scenes to implement insertelement constant exprs. More...
 
class  InsertElementInst
 This instruction inserts a single (scalar) element into a VectorType value. More...
 
class  InsertValueConstantExpr
 InsertValueConstantExpr - This class is private to Constants.cpp, and is used behind the scenes to implement insertvalue constant exprs. More...
 
class  InsertValueInst
 This instruction inserts a struct field of array element value into an aggregate value. More...
 
class  InsnInfo
 
class  InstCombinePass
 
class  InstCombiner
 The core instruction combiner logic. More...
 
class  InstCombineWorklist
 InstCombineWorklist - This is the worklist management logic for InstCombine. More...
 
class  InstIterator
 
struct  InstrInfoQuery
 InstrInfoQuery provides an interface to query additional information for instructions like metadata or keywords like nsw, which provides conservative results if the users specified it is safe to use. More...
 
class  InstrOrderFilePass
 The instrumentation pass for recording function order. More...
 
class  InstrProfiling
 Instrumentation based profiling lowering pass. More...
 
class  InstrProfIncrementInst
 This represents the llvm.instrprof_increment intrinsic. More...
 
class  InstrProfIncrementInstStep
 
struct  InstrProfOptions
 Options for the frontend instrumentation based profiling pass. More...
 
class  InstrProfValueProfileInst
 This represents the llvm.instrprof_value_profile intrinsic. More...
 
class  Instruction
 
class  InstructionCombiningPass
 The legacy pass manager's instcombine pass. More...
 
class  InstructionPrecedenceTracking
 
class  InstSimplifyPass
 Run instruction simplification across each instruction in the function. More...
 
class  InstVisitor
 Base class for instruction visitors. More...
 
class  IntAttributeImpl
 
struct  IntegerState
 Simple state with integers encoding. More...
 
class  IntegerType
 Class to represent integer types. More...
 
class  InterleavedAccessInfo
 Drive the analysis of interleaved memory accesses in the loop. More...
 
class  InterleaveGroup
 The group of interleaved loads/stores sharing the same stride and close to each other. More...
 
class  InternalizePass
 A pass that internalizes all functions and variables other than those that must be preserved according to MustPreserveGV. More...
 
class  Interval
 Interval Class - An Interval is a set of nodes defined such that every node in the interval has all of its predecessors in the interval (except for the header) More...
 
class  IntervalIterator
 
class  IntervalPartition
 
class  IntrinsicInst
 A wrapper class for inspecting calls to intrinsic functions. More...
 
class  IntToPtrInst
 This class represents a cast from an integer to a pointer. More...
 
struct  InvalidateAllAnalysesPass
 A utility pass that does nothing, but preserves no analyses. More...
 
struct  InvalidateAnalysisPass
 A no-op pass template which simply forces a specific analysis result to be invalidated. More...
 
class  InvokeInst
 Invoke instruction. More...
 
class  IPSCCPPass
 Pass to perform interprocedural constant propagation. More...
 
class  IRBuilder
 This provides a uniform API for creating instructions and inserting them into a basic block: either at the end of a BasicBlock, or at a specific iterator location in a block. More...
 
class  IRBuilderBase
 Common base class shared among various IRBuilders. More...
 
class  IRBuilderCallbackInserter
 Provides an 'InsertHelper' that calls a user-provided callback after performing the default insertion. More...
 
class  IRBuilderDefaultInserter
 This provides the default implementation of the IRBuilder 'InsertHelper' method that is called whenever an instruction is created by IRBuilder and needs to be inserted. More...
 
class  IRCEPass
 
class  IRMover
 
struct  is_copy_assignable
 
class  is_integral_or_enum
 Metafunction that determines whether the given type is either an integral type or an enumeration type, including enum classes. More...
 
struct  is_move_assignable
 
struct  is_simple_type
 
struct  is_trivially_copy_constructible
 An implementation of std::is_trivially_copy_constructible since we have users with STLs that don't yet include it. More...
 
struct  is_trivially_copy_constructible< T & >
 
struct  is_trivially_copy_constructible< T && >
 
class  is_trivially_copyable
 
class  is_trivially_copyable< T * >
 
struct  is_trivially_move_constructible
 An implementation of std::is_trivially_move_constructible since we have users with STLs that don't yet include it. More...
 
struct  is_trivially_move_constructible< T & >
 
struct  is_trivially_move_constructible< T && >
 
struct  isa_impl
 
struct  isa_impl< Argument, Value >
 
struct  isa_impl< BasicBlock, Value >
 
struct  isa_impl< Constant, Value >
 
struct  isa_impl< ConstantAggregate, Value >
 
struct  isa_impl< ConstantData, Value >
 
struct  isa_impl< Function, Value >
 
struct  isa_impl< GlobalAlias, Value >
 
struct  isa_impl< GlobalIFunc, Value >
 
struct  isa_impl< GlobalIndirectSymbol, Value >
 
struct  isa_impl< GlobalObject, Value >
 
struct  isa_impl< GlobalValue, Value >
 
struct  isa_impl< GlobalVariable, Value >
 
struct  isa_impl< InlineAsm, Value >
 
struct  isa_impl< Instruction, Value >
 
struct  isa_impl< PointerType, Type >
 
struct  isa_impl< To, From, typename std::enable_if< std::is_base_of< To, From >::value >::type >
 Always allow upcasts, and perform no dynamic check for them. More...
 
struct  isa_impl_cl
 
struct  isa_impl_cl< To, const From * >
 
struct  isa_impl_cl< To, const From *const >
 
struct  isa_impl_cl< To, const From >
 
struct  isa_impl_cl< To, const std::unique_ptr< From > >
 
struct  isa_impl_cl< To, From * >
 
struct  isa_impl_cl< To, From *const >
 
struct  isa_impl_wrap
 
struct  isa_impl_wrap< To, FromTy, FromTy >
 
class  ItaniumManglingCanonicalizer
 Canonicalizer for mangled names. More...
 
class  IVStrideUse
 IVStrideUse - Keep track of one use of a strided induction variable. More...
 
class  IVUsers
 
class  IVUsersAnalysis
 Analysis pass that exposes the IVUsers for a loop. More...
 
class  IVUsersPrinterPass
 Printer pass for the IVUsers for a loop. More...
 
class  IVUsersWrapperPass
 
class  IVVisitor
 Interface for visiting interesting IV users that are recognized but not simplified by this utility. More...
 
class  JamCRC
 
struct  JobHandleTraits
 
class  JumpThreadingPass
 This pass performs 'jump threading', which looks at blocks that have multiple predecessors and multiple successors. More...
 
struct  KnownBits
 
class  LandingPadInst
 The landingpad instruction holds all of the information necessary to generate correct exception handling. More...
 
struct  LatticeKeyInfo
 A template for translating between LLVM Values and LatticeKeys. More...
 
struct  LatticeKeyInfo< CVPLatticeKey >
 A specialization of LatticeKeyInfo for CVPLatticeKeys. More...
 
struct  LayoutAlignElem
 Layout alignment element. More...
 
class  LazyBlockFrequencyInfo
 Wraps a BFI to allow lazy computation of the block frequencies. More...
 
class  LazyBlockFrequencyInfoPass
 This is an alternative analysis pass to BlockFrequencyInfoWrapperPass. More...
 
class  LazyBranchProbabilityInfoPass
 This is an alternative analysis pass to BranchProbabilityInfoWrapperPass. More...
 
class  LazyCallGraph
 A lazily constructed view of the call graph of a module. More...
 
class  LazyCallGraphAnalysis
 An analysis pass which computes the call graph for a module. More...
 
class  LazyCallGraphDOTPrinterPass
 A pass which prints the call graph as a DOT file to a raw_ostream. More...
 
class  LazyCallGraphPrinterPass
 A pass which prints the call graph to a raw_ostream. More...
 
class  LazyValueAnalysis
 Analysis to compute lazy value information. More...
 
class  LazyValueInfo
 This pass computes, caches, and vends lazy value constraint information. More...
 
class  LazyValueInfoWrapperPass
 Wrapper around LazyValueInfo. More...
 
class  LCSSAPass
 Converts loops into loop-closed SSA form. More...
 
struct  LCSSAVerificationPass
 
class  LegacyAARGetter
 This class is a functor to be used in legacy module or SCC passes for computing AA results for a function. More...
 
class  LegacyDivergenceAnalysis
 
struct  LegacyInlinerBase
 This class contains all of the helper code which is used to perform the inlining operations that do not depend on the policy. More...
 
class  LibCallSimplifier
 LibCallSimplifier - This class implements a collection of optimizations that replace well formed calls to library functions with a more optimal form. More...
 
class  LibCallsShrinkWrapPass
 
class  LICMPass
 Performs Loop Invariant Code Motion Pass. More...
 
class  line_iterator
 A forward iterator which reads text lines from a buffer. More...
 
class  LinkDiagnosticInfo
 
class  Linker
 This class provides the core functionality of linking in LLVM. More...
 
class  LLLexer
 
class  LLParser
 
class  LLT
 
struct  llvm_shutdown_obj
 llvm_shutdown_obj - This is a simple helper class that calls llvm_shutdown() when it is destroyed. More...
 
class  LLVMContext
 This is an important class for using LLVM in a threaded context. More...
 
class  LLVMContextImpl
 
class  LoadAndStorePromoter
 Helper class for promoting a collection of loads and stores into SSA Form using the SSAUpdater. More...
 
class  LoadedObjectInfo
 An inferface for inquiring the load address of a loaded object file to be used by the DIContext implementations when applying relocations on the fly. More...
 
struct  LoadedObjectInfoHelper
 
class  LoadInfo
 
class  LoadInst
 An instruction for reading from memory. More...
 
class  LoadStoreVectorizerPass
 
class  LocalAsMetadata
 
struct  LocationMetadata
 Frontend-provided metadata for source location. More...
 
class  LocationSize
 
class  LockFileManager
 Class that manages the creation of a lock file to aid implicit coordination between different processes. More...
 
class  Loop
 Represents a single loop in the control flow graph. More...
 
class  LoopAccessAnalysis
 This analysis provides dependence information for the memory accesses of a loop. More...
 
class  LoopAccessInfo
 Drive the analysis of memory accesses in the loop. More...
 
class  LoopAccessInfoPrinterPass
 Printer pass for the LoopAccessInfo results. More...
 
class  LoopAccessLegacyAnalysis
 This analysis provides dependence information for the memory accesses of a loop. More...
 
class  LoopAnalysis
 Analysis pass that exposes the LoopInfo for a function. More...
 
class  LoopBase
 Instances of this class are used to represent loops that are detected in the flow graph. More...
 
class  LoopBlocksDFS
 Store the result of a depth first search within basic blocks contained by a single loop. More...
 
class  LoopBlocksRPO
 Wrapper class to LoopBlocksDFS that provides a standard begin()/end() interface for the DFS reverse post-order traversal of blocks in a loop body. More...
 
class  LoopBlocksTraversal
 Traverse the blocks in a loop using a depth-first search. More...
 
struct  LoopBodyTraits
 
class  LoopDataPrefetchPass
 An optimization pass inserting data prefetches in loops. More...
 
class  LoopDeletionPass
 
class  LoopDistributePass
 
class  LoopFullUnrollPass
 Loop unroll pass that only does full loop unrolling. More...
 
class  LoopFusePass
 
class  LoopIdiomRecognizePass
 Performs Loop Idiom Recognize Pass. More...
 
class  LoopInfo
 
class  LoopInfoBase
 This class builds and contains all of the top-level loop structures in the specified function. More...
 
class  LoopInfoWrapperPass
 The legacy pass manager's analysis pass to compute loop information. More...
 
class  LoopInstSimplifyPass
 Performs Loop Inst Simplify Pass. More...
 
struct  LoopLoadEliminationPass
 Pass to forward loads in a loop around the backedge to subsequent iterations. More...
 
class  LoopPass
 
class  LoopPredicationPass
 Performs Loop Predication Pass. More...
 
class  LoopPrinterPass
 Printer pass for the LoopAnalysis results. More...
 
class  LoopRotatePass
 A simple loop rotation transformation. More...
 
class  LoopSafetyInfo
 Captures loop safety information. More...
 
class  LoopSimplifyCFGPass
 Performs basic CFG simplifications to assist other loop passes. More...
 
class  LoopSimplifyPass
 This pass is responsible for loop canonicalization. More...
 
class  LoopSinkPass
 A pass that does profile-guided sinking of instructions into loops. More...
 
struct  LoopStandardAnalysisResults
 The adaptor from a function pass to a loop pass computes these analyses and makes them available to the loop passes "for free". More...
 
class  LoopStrengthReducePass
 Performs Loop Strength Reduce Pass. More...
 
class  LoopUnrollAndJamPass
 A simple loop rotation transformation. More...
 
struct  LoopUnrollOptions
 A set of parameters used to control various transforms performed by the LoopUnroll pass. More...
 
class  LoopUnrollPass
 Loop unroll pass that will support both full and partial unrolling. More...
 
class  LoopVectorizationCostModel
 LoopVectorizationCostModel - estimates the expected speedups due to vectorization. More...
 
class  LoopVectorizationLegality
 LoopVectorizationLegality checks if it is legal to vectorize a loop, and to what vectorization factor. More...
 
class  LoopVectorizationPlanner
 Planner drives the vectorization process after having passed Legality checks. More...
 
class  LoopVectorizationRequirements
 This holds vectorization requirements that must be verified late in the process. More...
 
class  LoopVectorizeHints
 Utility class for getting and setting loop vectorizer hints in the form of loop metadata. More...
 
struct  LoopVectorizeOptions
 
struct  LoopVectorizePass
 The LoopVectorize Pass. More...
 
struct  LoopVerifierPass
 Verifier pass for the LoopAnalysis results. More...
 
class  LoopVersioning
 This class emits a version of the loop where run-time checks ensure that may-alias pointers can't overlap. More...
 
class  LowerAtomicPass
 A pass that lowers atomic intrinsic into non-atomic intrinsics. More...
 
struct  LowerExpectIntrinsicPass
 
struct  LowerGuardIntrinsicPass
 
class  LowerInvokePass
 
class  LowerTypeTestsPass
 
struct  LowerWidenableConditionPass
 
class  LPMUpdater
 This class provides an interface for updating the loop pass manager based on mutations to the loop nest. More...
 
class  LPPassManager
 
class  LShrOperator
 
struct  LTOCodeGenerator
 C++ class which implements the opaque lto_code_gen_t type. More...
 
struct  LTOModule
 C++ class which implements the opaque lto_module_t type. More...
 
struct  MakeGuardsExplicitPass
 
class  MallocAllocator
 
class  ManagedStatic
 ManagedStatic - This transparently changes the behavior of global statics to be lazily constructed on demand (good for reducing startup times of dynamic libraries that link in LLVM components) and for making destruction be explicit through the llvm_shutdown() function call. More...
 
class  ManagedStaticBase
 ManagedStaticBase - Common base class for ManagedStatic instances. More...
 
class  Mangler
 
class  MaximumSpanningTree
 MaximumSpanningTree - A MST implementation. More...
 
class  MD5
 
class  MDAttachmentMap
 Map-like storage for metadata attachments. More...
 
class  MDBuilder
 
class  MDGlobalAttachmentMap
 Multimap-like storage for metadata attachments for globals. More...
 
class  MDNode
 Metadata node. More...
 
struct  MDNodeInfo
 DenseMapInfo for MDNode subclasses. More...
 
struct  MDNodeKeyImpl
 
struct  MDNodeKeyImpl< DIBasicType >
 
struct  MDNodeKeyImpl< DICommonBlock >
 
struct  MDNodeKeyImpl< DICompositeType >
 
struct  MDNodeKeyImpl< DIDerivedType >
 
struct  MDNodeKeyImpl< DIEnumerator >
 
struct  MDNodeKeyImpl< DIExpression >
 
struct  MDNodeKeyImpl< DIFile >
 
struct  MDNodeKeyImpl< DIGlobalVariable >
 
struct  MDNodeKeyImpl< DIGlobalVariableExpression >
 
struct  MDNodeKeyImpl< DIImportedEntity >
 
struct  MDNodeKeyImpl< DILabel >
 
struct  MDNodeKeyImpl< DILexicalBlock >
 
struct  MDNodeKeyImpl< DILexicalBlockFile >
 
struct  MDNodeKeyImpl< DILocalVariable >
 
struct  MDNodeKeyImpl< DILocation >
 DenseMapInfo for DILocation. More...
 
struct  MDNodeKeyImpl< DIMacro >
 
struct  MDNodeKeyImpl< DIMacroFile >
 
struct  MDNodeKeyImpl< DIModule >
 
struct  MDNodeKeyImpl< DINamespace >
 
struct  MDNodeKeyImpl< DIObjCProperty >
 
struct  MDNodeKeyImpl< DISubprogram >
 
struct  MDNodeKeyImpl< DISubrange >
 
struct  MDNodeKeyImpl< DISubroutineType >
 
struct  MDNodeKeyImpl< DITemplateTypeParameter >
 
struct  MDNodeKeyImpl< DITemplateValueParameter >
 
struct  MDNodeKeyImpl< GenericDINode >
 DenseMapInfo for GenericDINode. More...
 
struct  MDNodeKeyImpl< MDTuple >
 DenseMapInfo for MDTuple. More...
 
class  MDNodeOpsKey
 Structure for hashing arbitrary MDNode operands. More...
 
struct  MDNodeSubsetEqualImpl
 Configuration point for MDNodeInfo::isEqual(). More...
 
struct  MDNodeSubsetEqualImpl< DIDerivedType >
 
struct  MDNodeSubsetEqualImpl< DISubprogram >
 
class  MDOperand
 Tracking metadata reference owned by Metadata. More...
 
class  MDString
 A single uniqued string. More...
 
class  MDTuple
 Tuple of metadata. More...
 
class  MDTupleTypedArrayWrapper
 Typed, array-like tuple of metadata. More...
 
class  MemCpyInst
 This class wraps the llvm.memcpy intrinsic. More...
 
class  MemCpyOptPass
 
class  MemDepResult
 A memory dependence query can return one of three different answers. More...
 
class  MemIntrinsic
 This is the common base class for memset/memcpy/memmove. More...
 
class  MemIntrinsicBase
 Common base class for all memory intrinsics. More...
 
struct  MemIntrinsicInfo
 Information about a load/store intrinsic defined by the target. More...
 
class  MemMoveInst
 This class wraps the llvm.memmove intrinsic. More...
 
class  MemoryAccess
 
class  memoryaccess_def_iterator_base
 Iterator base class used to implement const and non-const iterators over the defining accesses of a MemoryAccess. More...
 
class  MemoryBuffer
 This interface provides simple read-only access to a block of memory, and provides simple methods for reading files and standard input into a memory buffer. More...
 
class  MemoryBufferByteStream
 An implementation of BinaryStream whose data is backed by an llvm MemoryBuffer object. More...
 
class  MemoryBufferRef
 
class  MemoryDef
 Represents a read-write access to memory, whether it is a must-alias, or a may-alias. More...
 
class  MemoryDepChecker
 Checks memory dependences among accesses to the same underlying object to determine whether there vectorization is legal or not (and at which vectorization factor). More...
 
class  MemoryDependenceAnalysis
 An analysis that produces MemoryDependenceResults for a function. More...
 
class  MemoryDependenceResults
 Provides a lazy, caching interface for making common memory aliasing information queries, backed by LLVM's alias analysis passes. More...
 
class  MemoryDependenceWrapperPass
 A wrapper analysis pass for the legacy pass manager that exposes a MemoryDepnedenceResults instance. More...
 
class  MemoryLocation
 Representation for a specific memory location. More...
 
class  MemoryPhi
 Represents phi nodes for memory accesses. More...
 
struct  MemorySanitizerOptions
 
struct  MemorySanitizerPass
 A function pass for msan instrumentation. More...
 
class  MemorySSA
 Encapsulates MemorySSA, including all data associated with memory accesses. More...
 
class  MemorySSAAnalysis
 An analysis that produces MemorySSA for a function. More...
 
class  MemorySSAAnnotatedWriter
 An assembly annotator class to print Memory SSA information in comments. More...
 
class  MemorySSAPrinterLegacyPass
 
class  MemorySSAPrinterPass
 Printer pass for MemorySSA. More...
 
class  MemorySSAUpdater
 
class  MemorySSAUtil
 
struct  MemorySSAVerifierPass
 Verifier pass for MemorySSA. More...
 
class  MemorySSAWalker
 This is the generic walker interface for walkers of MemorySSA. More...
 
class  MemorySSAWrapperPass
 Legacy analysis pass which computes MemorySSA. More...
 
class  MemoryUse
 Represents read-only accesses to memory. More...
 
class  MemoryUseOrDef
 Class that has the common methods + fields of memory uses/defs. More...
 
class  MemoryWriteTracking
 
class  MemSetBase
 Common base class for all memset intrinsics. More...
 
class  MemSetInst
 This class wraps the llvm.memset intrinsic. More...
 
class  MemTransferBase
 Common base class for all memory transfer intrinsics. More...
 
class  MemTransferInst
 This class wraps the llvm.memcpy/memmove intrinsics. More...
 
class  MergedLoadStoreMotionPass
 
struct  MergeICmpsPass
 
class  Metadata
 Root of the metadata hierarchy. More...
 
class  MetadataAsValue
 Metadata wrapper in the Value hierarchy. More...
 
class  MetadataTracking
 API for tracking metadata references through RAUW and deletion. More...
 
class  Module
 A Module instance is used to store all the information related to an LLVM module. More...
 
class  ModuleAddressSanitizerPass
 Public interface to the address sanitizer module pass for instrumenting code to check for various memory errors. More...
 
class  ModuleSlotTracker
 Manage lifetime of a slot tracker for printing IR. More...
 
class  ModuleSummaryIndex
 Class to hold module path string table and global value map, and encapsulate methods for operating on them. More...
 
class  ModuleSummaryIndexAnalysis
 Analysis pass to provide the ModuleSummaryIndex object. More...
 
class  ModuleSummaryIndexWrapperPass
 Legacy wrapper pass to provide the ModuleSummaryIndex object. More...
 
class  ModuleToFunctionPassAdaptor
 Trivial adaptor that maps from a module to its functions. More...
 
class  ModuleToPostOrderCGSCCPassAdaptor
 The core module pass which does a post-order walk of the SCCs and runs a CGSCC pass over each one. More...
 
class  MSVCPError
 
class  MSVCPExpected
 
class  MulOperator
 
class  MutableArrayRef
 
class  MutableBinaryByteStream
 An implementation of BinaryStream which holds its entire data set in a single contiguous buffer. More...
 
class  MutexGuard
 Instances of this class acquire a given Mutex Lock when constructed and hold that lock until destruction. More...
 
class  MVT
 Machine Value Type. More...
 
class  NameAnonGlobalPass
 Simple pass that provides a name to every anonymous globals. More...
 
class  NamedMDNode
 A tuple of MDNodes. More...
 
struct  NamedRegionTimer
 This class is basically a combination of TimeRegion and Timer. More...
 
class  NaryReassociatePass
 
class  NewGVNPass
 
class  NoFolder
 NoFolder - Create "constants" (actually, instructions) with no folding. More...
 
class  NonLocalDepEntry
 This is an entry in the NonLocalDepInfo cache. More...
 
class  NonLocalDepResult
 This is a result from a NonLocal dependence query. More...
 
struct  object_creator
 object_creator - Helper method for ManagedStatic. More...
 
struct  object_deleter
 object_deleter - Helper method for ManagedStatic. More...
 
struct  object_deleter< T[N]>
 
class  ObjectSizeOffsetEvaluator
 Evaluate the size and offset of an object pointed to by a Value*. More...
 
class  ObjectSizeOffsetVisitor
 Evaluate the size and offset of an object pointed to by a Value* statically. More...
 
struct  ObjectSizeOpts
 Various options to control the behavior of getObjectSize. More...
 
class  OnDiskChainedHashTable
 Provides lookup on an on disk hash table. More...
 
class  OnDiskChainedHashTableGenerator
 Generates an on disk hash table. More...
 
class  OnDiskIterableChainedHashTable
 Provides lookup and iteration over an on disk hash table. More...
 
class  OperandBundleDefT
 A container for an operand bundle being viewed as a set of values rather than a set of uses. More...
 
struct  OperandBundleUse
 A lightweight accessor for an operand bundle meant to be passed around by value. More...
 
struct  OperandTraits
 Compile-time customization of User operands. More...
 
struct  OperandTraits< AtomicCmpXchgInst >
 
struct  OperandTraits< AtomicRMWInst >
 
struct  OperandTraits< BinaryConstantExpr >
 
struct  OperandTraits< BinaryOperator >
 
struct  OperandTraits< BlockAddress >
 
struct  OperandTraits< BranchInst >
 
struct  OperandTraits< CallBase >
 
struct  OperandTraits< CatchReturnInst >
 
struct  OperandTraits< CatchSwitchInst >
 
struct  OperandTraits< CleanupReturnInst >
 
struct  OperandTraits< CmpInst >
 
struct  OperandTraits< CompareConstantExpr >
 
struct  OperandTraits< ConstantAggregate >
 
struct  OperandTraits< ConstantExpr >
 
struct  OperandTraits< ExtractElementConstantExpr >
 
struct  OperandTraits< ExtractElementInst >
 
struct  OperandTraits< ExtractValueConstantExpr >
 
struct  OperandTraits< FuncletPadInst >
 
struct  OperandTraits< Function >
 
struct  OperandTraits< GetElementPtrConstantExpr >
 
struct  OperandTraits< GetElementPtrInst >
 
struct  OperandTraits< GlobalIndirectSymbol >
 
struct  OperandTraits< GlobalVariable >
 
struct  OperandTraits< IndirectBrInst >
 
struct  OperandTraits< InsertElementConstantExpr >
 
struct  OperandTraits< InsertElementInst >
 
struct  OperandTraits< InsertValueConstantExpr >
 
struct  OperandTraits< InsertValueInst >
 
struct  OperandTraits< LandingPadInst >
 
struct  OperandTraits< MemoryDef >
 
struct  OperandTraits< MemoryPhi >
 
struct  OperandTraits< MemoryUse >
 
struct  OperandTraits< MemoryUseOrDef >
 
struct  OperandTraits< PHINode >
 
struct  OperandTraits< ResumeInst >
 
struct  OperandTraits< ReturnInst >
 
struct  OperandTraits< SelectConstantExpr >
 
struct  OperandTraits< SelectInst >
 
struct  OperandTraits< ShuffleVectorConstantExpr >
 
struct  OperandTraits< ShuffleVectorInst >
 
struct  OperandTraits< StoreInst >
 
struct  OperandTraits< SwitchInst >
 
struct  OperandTraits< UnaryConstantExpr >
 
struct  OperandTraits< UnaryInstruction >
 
class  Operator
 This is a utility class that provides an abstraction for the common functionality between Instructions and ConstantExprs. More...
 
class  OptBisect
 This class implements a mechanism to disable passes and individual optimizations at compile time based on a command line option (-opt-bisect-limit) in order to perform a bisecting search for optimization-related problems. More...
 
class  OptimizationRemark
 Diagnostic information for applied optimization remarks. More...
 
class  OptimizationRemarkAnalysis
 Diagnostic information for optimization analysis remarks. More...
 
class  OptimizationRemarkAnalysisAliasing
 Diagnostic information for optimization analysis remarks related to pointer aliasing. More...
 
class  OptimizationRemarkAnalysisFPCommute
 Diagnostic information for optimization analysis remarks related to floating-point non-commutativity. More...
 
class  OptimizationRemarkEmitter
 The optimization diagnostic interface. More...
 
class  OptimizationRemarkEmitterAnalysis
 
class  OptimizationRemarkEmitterWrapperPass
 OptimizationRemarkEmitter legacy analysis pass. More...
 
class  OptimizationRemarkMissed
 Diagnostic information for missed-optimization remarks. More...
 
class  Optional
 
struct  OptionalOperandTraits
 OptionalOperandTraits - when the number of operands may change at runtime. More...
 
class  OptionRegistry
 Singleton class used to register debug options. More...
 
class  OptPassGate
 Extensions to this class implement mechanisms to disable passes and individual optimizations at compile time. More...
 
class  OrderedBasicBlock
 
class  OrderedInstructions
 
class  OuterAnalysisManagerProxy
 An analysis over an "inner" IR unit that provides access to an analysis manager over a "outer" IR unit. More...
 
class  OverflowingBinaryOperator
 Utility class for integer operators which may exhibit overflow - Add, Sub, Mul, and Shl. More...
 
struct  ParsedModuleAndIndex
 Holds the Module and ModuleSummaryIndex returned by the interfaces that parse both. More...
 
class  PartialInlinerPass
 Pass to remove unused function declarations. More...
 
class  PartiallyInlineLibCallsPass
 
class  PassArgFilter
 ===-------------------------------------------------------------------—===// PassArgFilter - A filter for use with PassNameFilterParser that only accepts a Pass whose Arg matches certain strings. More...
 
class  PassBuilder
 This class provides access to building LLVM's passes. More...
 
struct  PassInfoMixin
 A CRTP mix-in to automatically provide informational APIs needed for passes. More...
 
class  PassInstrumentation
 This class provides instrumentation entry points for the Pass Manager, doing calls to callbacks registered in PassInstrumentationCallbacks. More...
 
class  PassInstrumentationAnalysis
 Pseudo-analysis pass that exposes the PassInstrumentation to pass managers. More...
 
class  PassInstrumentationCallbacks
 This class manages callbacks registration, as well as provides a way for PassInstrumentation to pass control to the registered callbacks. More...
 
class  PassManager
 Manages a sequence of passes over a particular unit of IR. More...
 
class  PassManagerBuilder
 PassManagerBuilder - This class is used to set up a standard optimization sequence for languages like C and C++, allowing some APIs to customize the pass sequence in various ways. More...
 
class  PassManagerPrettyStackEntry
 PassManagerPrettyStackEntry - This is used to print informative information about what pass is running when/if a stack trace is generated. More...
 
class  PassNameParser
 
class  PassPlugin
 A loaded pass plugin. More...
 
struct  PassPluginLibraryInfo
 Information about the plugin required to load its passes. More...
 
class  PGOIndirectCallPromotion
 The indirect function call promotion pass. More...
 
struct  PGOIndirectCallVisitor
 
class  PGOInstrumentationGen
 The instrumentation (profile-instr-gen) pass for IR based PGO. More...
 
class  PGOInstrumentationGenCreateVar
 The instrumentation (profile-instr-gen) pass for IR based PGO. More...
 
class  PGOInstrumentationUse
 The profile annotation (profile-instr-use) pass for IR based PGO. More...
 
class  PGOMemOPSizeOpt
 The profile size based optimization pass for memory intrinsics. More...
 
struct  PGOOptions
 A struct capturing PGO tunables. More...
 
class  PHINode
 
class  PHITransAddr
 PHITransAddr - An address value which tracks and handles phi translation. More...
 
class  PhiValues
 Class for calculating and caching the underlying values of phis in a function. More...
 
class  PhiValuesAnalysis
 The analysis pass which yields a PhiValues. More...
 
class  PhiValuesPrinterPass
 A pass for printing the PhiValues for a function. More...
 
class  PhiValuesWrapperPass
 Wrapper pass for the legacy pass manager. More...
 
class  PipelineTuningOptions
 Tunable parameters for passes in the default pipelines. More...
 
struct  PluginLoader
 
class  PMDataManager
 PMDataManager provides the common place to manage the analysis data used by pass managers. More...
 
class  PMStack
 PMStack - This class implements a stack data structure of PMDataManager pointers. More...
 
class  PMTopLevelManager
 PMTopLevelManager manages LastUser info and collects common APIs used by top level pass managers. More...
 
class  po_iterator_storage< LoopBlocksTraversal, true >
 Specialize po_iterator_storage to record postorder numbers. More...
 
struct  PointerAlignElem
 Layout pointer alignment element. More...
 
struct  PointerLikeTypeTraits
 A traits type that is used to handle pointer types and things that are just wrappers for pointers as a uniform entity. More...
 
struct  PointerLikeTypeTraits< const T * >
 
struct  PointerLikeTypeTraits< const T >
 
struct  PointerLikeTypeTraits< ReturnT(*)(ParamTs...)>
 Provide a default specialization for function pointers that assumes 4-byte alignment. More...
 
struct  PointerLikeTypeTraits< T * >
 
struct  PointerLikeTypeTraits< uintptr_t >
 
struct  PointerLikeTypeTraits< void * >
 
class  PointerType
 Class to represent pointers. More...
 
struct  PoisonCheckingPass
 
class  PoisoningVH
 Value handle that poisons itself if the Value is deleted. More...
 
class  PooledStringPtr
 PooledStringPtr - A pointer to an interned string. More...
 
class  PopulateLoopsDFS
 Populate all loop data in a stable order during a single forward DFS. More...
 
class  PossiblyExactOperator
 A udiv or sdiv instruction, which can be marked as "exact", indicating that no bits are destroyed. More...
 
class  PostDominatorTree
 PostDominatorTree Class - Concrete subclass of DominatorTree that is used to compute the post-dominator tree. More...
 
class  PostDominatorTreeAnalysis
 Analysis pass which computes a PostDominatorTree. More...
 
class  PostDominatorTreePrinterPass
 Printer pass for the PostDominatorTree. More...
 
struct  PostDominatorTreeWrapperPass
 
struct  PostOrderFunctionAttrsPass
 Computes function attributes in post-order over the call graph. More...
 
class  PredicateAssume
 
class  PredicateBase
 
class  PredicateBranch
 
class  PredicatedScalarEvolution
 An interface layer with SCEV used to manage how we see SCEV expressions for values in the context of existing predicates. More...
 
class  PredicateInfo
 Encapsulates PredicateInfo, including all data associated with memory accesses. More...
 
class  PredicateInfoAnnotatedWriter
 An assembly annotator class to print PredicateInfo information in comments. More...
 
class  PredicateInfoPrinterLegacyPass
 
class  PredicateInfoPrinterPass
 Printer pass for PredicateInfo. More...
 
struct  PredicateInfoVerifierPass
 Verifier pass for PredicateInfo. More...
 
class  PredicateSwitch
 
class  PredicateWithCondition
 
class  PredicateWithEdge
 
class  PredIterator
 
class  PredIteratorCache
 PredIteratorCache - This class is an extremely trivial cache for predecessor iterator queries. More...
 
class  PreservedAnalyses
 A set of analyses that are preserved following a run of a transformation pass. More...
 
class  PrettyStackTraceEntry
 PrettyStackTraceEntry - This class is used to represent a frame of the "pretty" stack trace that is dumped when a program crashes. More...
 
class  PrettyStackTraceFormat
 PrettyStackTraceFormat - This object prints a string (which may use printf-style formatting but should not contain newlines) to the stream as the stack trace when a crash occurs. More...
 
class  PrettyStackTraceProgram
 PrettyStackTraceProgram - This object prints a specified program arguments to the stream as the stack trace when a crash occurs. More...
 
class  PrettyStackTraceString
 PrettyStackTraceString - This object prints a specified string (which should not contain newlines) to the stream as the stack trace when a crash occurs. More...
 
class  Printable
 Simple wrapper around std::function<void(raw_ostream&)>. More...
 
class  PrintFunctionPass
 Pass for printing a Function as LLVM's text IR assembly. More...
 
class  PrintIRInstrumentation
 Instrumentation to print IR before/after passes. More...
 
class  PrintLoopPass
 Pass for printing a loop's contents as textual IR. More...
 
class  PrintModulePass
 Pass for printing a Module as LLVM's text IR assembly. More...
 
class  ProfileSummary
 
class  ProfileSummaryAnalysis
 An analysis pass based on the new PM to deliver ProfileSummaryInfo. More...
 
struct  ProfileSummaryEntry
 
class  ProfileSummaryInfo
 Analysis providing profile information. More...
 
class  ProfileSummaryInfoWrapperPass
 An analysis pass based on legacy pass manager to deliver ProfileSummaryInfo. More...
 
class  ProfileSummaryPrinterPass
 Printer pass that uses ProfileSummaryAnalysis. More...
 
class  PromotePass
 
class  PtrToIntInst
 This class represents a cast from a pointer to an integer. More...
 
class  PtrToIntOperator
 
class  PtrUseVisitor
 A base class for visitors over the uses of a pointer value. More...
 
class  RandomNumberGenerator
 A random number generator. More...
 
struct  RangeListEntry
 A class representing a single range list entry. More...
 
class  raw_fd_ostream
 A raw_ostream that writes to a file descriptor. More...
 
class  raw_null_ostream
 A raw_ostream that discards all output. More...
 
class  raw_os_ostream
 raw_os_ostream - A raw_ostream that writes to an std::ostream. More...
 
class  raw_ostream
 This class implements an extremely fast bulk output stream that can only output to a stream. More...
 
class  raw_pwrite_stream
 An abstract base class for streams implementations that also support a pwrite operation. More...
 
class  raw_sha1_ostream
 A raw_ostream that hash the content using the sha1 algorithm. More...
 
class  raw_string_ostream
 A raw_ostream that writes to an std::string. More...
 
class  raw_svector_ostream
 A raw_ostream that writes to an SmallVector or SmallString. More...
 
class  ReassociatePass
 Reassociate commutative expressions. More...
 
class  RecurrenceDescriptor
 The RecurrenceDescriptor is used to identify recurrences variables in a loop. More...
 
class  Recycler
 Recycler - This class manages a linked-list of deallocated nodes and facilitates reusing deallocated memory in place of allocating new memory. More...
 
class  RecyclingAllocator
 RecyclingAllocator - This class wraps an Allocator, adding the functionality of recycling deleted objects. More...
 
class  Regex
 
class  Region
 
class  RegionBase
 A single entry single exit Region. More...
 
class  RegionInfo
 
class  RegionInfoAnalysis
 Analysis pass that exposes the RegionInfo for a function. More...
 
class  RegionInfoBase
 Analysis that detects all canonical Regions. More...
 
class  RegionInfoPass
 
class  RegionInfoPrinterPass
 Printer pass for the RegionInfo. More...
 
struct  RegionInfoVerifierPass
 Verifier pass for the RegionInfo. More...
 
class  RegionNode
 
class  RegionNodeBase
 A RegionNode represents a subregion or a BasicBlock that is part of a Region. More...
 
class  RegionPass
 A pass that runs on each Region in a function. More...
 
struct  RegionTraits
 
struct  RegionTraits< Function >
 
struct  RegisterAsmPrinter
 RegisterAsmPrinter - Helper template for registering a target specific assembly printer, for use in the target machine initialization function. More...
 
struct  RegisterMCAsmBackend
 RegisterMCAsmBackend - Helper template for registering a target specific assembler backend. More...
 
struct  RegisterMCAsmInfo
 RegisterMCAsmInfo - Helper template for registering a target assembly info implementation. More...
 
struct  RegisterMCAsmInfoFn
 RegisterMCAsmInfoFn - Helper template for registering a target assembly info implementation. More...
 
struct  RegisterMCAsmParser
 RegisterMCAsmParser - Helper template for registering a target specific assembly parser, for use in the target machine initialization function. More...
 
struct  RegisterMCCodeEmitter
 RegisterMCCodeEmitter - Helper template for registering a target specific machine code emitter, for use in the target initialization function. More...
 
struct  RegisterMCInstrAnalysis
 RegisterMCInstrAnalysis - Helper template for registering a target instruction analyzer implementation. More...
 
struct  RegisterMCInstrAnalysisFn
 RegisterMCInstrAnalysisFn - Helper template for registering a target instruction analyzer implementation. More...
 
struct  RegisterMCInstrInfo
 RegisterMCInstrInfo - Helper template for registering a target instruction info implementation. More...
 
struct  RegisterMCInstrInfoFn
 RegisterMCInstrInfoFn - Helper template for registering a target instruction info implementation. More...
 
struct  RegisterMCRegInfo
 RegisterMCRegInfo - Helper template for registering a target register info implementation. More...
 
struct  RegisterMCRegInfoFn
 RegisterMCRegInfoFn - Helper template for registering a target register info implementation. More...
 
struct  RegisterMCSubtargetInfo
 RegisterMCSubtargetInfo - Helper template for registering a target subtarget info implementation. More...
 
struct  RegisterMCSubtargetInfoFn
 RegisterMCSubtargetInfoFn - Helper template for registering a target subtarget info implementation. More...
 
struct  RegisterStandardPasses
 Registers a function for adding a standard set of passes. More...
 
struct  RegisterTarget
 RegisterTarget - Helper template for registering a target, for use in the target's initialization function. More...
 
struct  RegisterTargetMachine
 RegisterTargetMachine - Helper template for registering a target machine implementation, for use in the target machine initialization function. More...
 
class  Registry
 A global registry used in conjunction with static constructors to make pluggable components (like targets or garbage collectors) "just work" when linked with an executable. More...
 
struct  RegTraits
 
struct  RelocAddrEntry
 RelocAddrEntry contains relocated value and section index. More...
 
struct  RemarkSetupErrorInfo
 
struct  RemarkSetupFileError
 
struct  RemarkSetupFormatError
 
struct  RemarkSetupPatternError
 
class  RemarkStreamer
 Streamer for remarks. More...
 
class  RepeatedPass
 A utility pass template that simply runs another pass multiple times. More...
 
class  ReplaceableMetadataImpl
 Shared implementation of use-lists for replaceable metadata. More...
 
struct  ReplacementItem
 
struct  RequireAnalysisPass
 A utility pass template to force an analysis result to be available. More...
 
struct  RequireAnalysisPass< AnalysisT, LazyCallGraph::SCC, CGSCCAnalysisManager, LazyCallGraph &, CGSCCUpdateResult & >
 An explicit specialization of the require analysis template pass. More...
 
struct  RequireAnalysisPass< AnalysisT, Loop, LoopAnalysisManager, LoopStandardAnalysisResults &, LPMUpdater & >
 A partial specialization of the require analysis template pass to forward the extra parameters from a transformation's run method to the AnalysisManager's getResult. More...
 
class  ResumeInst
 Resume the propagation of an exception. More...
 
class  ReturnInst
 Return a value (possibly void), from a function. More...
 
class  ReversePostOrderFunctionAttrsPass
 A pass to do RPO deduction and propagation of function attributes. More...
 
struct  RewriteStatepointsForGC
 
class  RewriteSymbolPass
 
class  RGPassManager
 The pass manager to schedule RegionPasses. More...
 
class  RNSuccIterator
 Hierarchical RegionNode successor iterator. More...
 
class  RNSuccIterator< FlatIt< NodeRef >, BlockT, RegionT >
 Flat RegionNode iterator. More...
 
class  RuntimePointerChecking
 Holds information about the memory runtime legality checks to verify that a group of pointers do not overlap. More...
 
class  SafepointIRVerifierPass
 Create an instance of the safepoint verifier pass which can be added to a pass pipeline to check for relocation bugs. More...
 
class  SampleProfileLoaderPass
 The sample profiler data loader pass. More...
 
struct  SanitizerCoverageOptions
 
struct  SanitizerStatReport
 
class  SaturatingInst
 Represents a saturating add/sub intrinsic. More...
 
struct  SaveAndRestore
 A utility class that uses RAII to save and restore the value of a variable. More...
 
class  ScalarEvolution
 The main scalar evolution driver. More...
 
class  ScalarEvolutionAnalysis
 Analysis pass that exposes the ScalarEvolution for a function. More...
 
class  ScalarEvolutionPrinterPass
 Printer pass for the ScalarEvolutionAnalysis results. More...
 
class  ScalarEvolutionWrapperPass
 
class  ScalarizerPass
 
class  ScaledNumber
 Simple representation of a scaled number. More...
 
class  ScaledNumberBase
 
class  SCCPPass
 This pass performs function-level constant propagation and merging. More...
 
class  SCEV
 This class represents an analyzed expression in the program. More...
 
class  SCEVAA
 Analysis pass providing a never-invalidated alias analysis result. More...
 
class  SCEVAAResult
 A simple alias analysis implementation that uses ScalarEvolution to answer queries. More...
 
class  SCEVAAWrapperPass
 Legacy wrapper pass to provide the SCEVAAResult object. More...
 
class  SCEVAddExpr
 This node represents an addition of some number of SCEVs. More...
 
class  SCEVAddRecExpr
 This node represents a polynomial recurrence on the trip count of the specified loop. More...
 
class  SCEVCastExpr
 This is the base class for unary cast operator classes. More...
 
class  SCEVCommutativeExpr
 This node is the base class for n'ary commutative operators. More...
 
class  SCEVConstant
 This class represents a constant integer value. More...
 
struct  SCEVCouldNotCompute
 An object of this class is returned by queries that could not be answered. More...
 
class  SCEVEqualPredicate
 This class represents an assumption that two SCEV expressions are equal, and this can be checked at run-time. More...
 
class  SCEVExpander
 This class uses information about analyze scalars to rewrite expressions in canonical form. More...
 
class  SCEVLoopAddRecRewriter
 The SCEVLoopAddRecRewriter takes a scalar evolution expression and applies the Map (Loop -> SCEV) to all AddRecExprs. More...
 
class  SCEVMinMaxExpr
 This node is the base class min/max selections. More...
 
class  SCEVMulExpr
 This node represents multiplication of some number of SCEVs. More...
 
class  SCEVNAryExpr
 This node is a base class providing common functionality for n'ary operators. More...
 
class  SCEVParameterRewriter
 The SCEVParameterRewriter takes a scalar evolution expression and updates the SCEVUnknown components following the Map (Value -> Value). More...
 
class  SCEVPredicate
 This class represents an assumption made using SCEV expressions which can be checked at run-time. More...
 
class  SCEVRewriteVisitor
 This visitor recursively visits a SCEV expression and re-writes it. More...
 
class  SCEVSignExtendExpr
 This class represents a sign extension of a small integer value to a larger integer value. More...
 
class  SCEVSMaxExpr
 This class represents a signed maximum selection. More...
 
class  SCEVSMinExpr
 This class represents a signed minimum selection. More...
 
class  SCEVTraversal
 Visit all nodes in the expression tree using worklist traversal. More...
 
class  SCEVTruncateExpr
 This class represents a truncation of an integer value to a smaller integer value. More...
 
class  SCEVUDivExpr
 This class represents a binary unsigned division operation. More...
 
class  SCEVUMaxExpr
 This class represents an unsigned maximum selection. More...
 
class  SCEVUMinExpr
 This class represents an unsigned minimum selection. More...
 
class  SCEVUnionPredicate
 This class represents a composition of other SCEV predicates, and is the class that most clients will interact with. More...
 
class  SCEVUnknown
 This means that we are dealing with an entirely unknown SCEV value, and only represent it as its LLVM Value. More...
 
struct  SCEVVisitor
 This class defines a simple visitor class that may be used for various SCEV analysis purposes. More...
 
class  SCEVWrapPredicate
 This class represents an assumption made on an AddRec expression. More...
 
class  SCEVZeroExtendExpr
 This class represents a zero extension of a small integer value to a larger integer value. More...
 
struct  ScopedFatalErrorHandler
 ScopedFatalErrorHandler - This is a simple helper class which just calls install_fatal_error_handler in its constructor and remove_fatal_error_handler in its destructor. More...
 
class  ScopedHandle
 
class  ScopedNoAliasAA
 Analysis pass providing a never-invalidated alias analysis result. More...
 
class  ScopedNoAliasAAResult
 A simple AA result which uses scoped-noalias metadata to answer queries. More...
 
class  ScopedNoAliasAAWrapperPass
 Legacy wrapper pass to provide the ScopedNoAliasAAResult object. More...
 
class  ScopedPrinter
 
class  SDivOperator
 
struct  SectionName
 
class  SelectConstantExpr
 SelectConstantExpr - This class is private to Constants.cpp, and is used behind the scenes to implement select constant exprs. More...
 
class  SelectInst
 This class represents the LLVM 'select' instruction. More...
 
struct  SelectPatternResult
 
class  SequentialType
 This is the superclass of the array and vector type classes. More...
 
class  SExtInst
 This class represents a sign extension of integer types. More...
 
class  SHA1
 A class that wrap the SHA1 algorithm. More...
 
class  ShlOperator
 
class  ShuffleVectorConstantExpr
 ShuffleVectorConstantExpr - This class is private to Constants.cpp, and is used behind the scenes to implement shufflevector constant exprs. More...
 
class  ShuffleVectorInst
 This instruction constructs a fixed permutation of two input vectors. More...
 
class  SignpostEmitter
 Manages the emission of signposts into the recording method supported by the OS. More...
 
class  SimpleLoopSafetyInfo
 Simple and conservative implementation of LoopSafetyInfo that can give false-positive answers to its queries in order to avoid complicated analysis. More...
 
class  SimpleLoopUnswitchPass
 This pass transforms loops that contain branches or switches on loop- invariant conditions to have multiple loops. More...
 
class  SimpleRegistryEntry
 A simple registry entry which provides only a name, description, and no-argument constructor. More...
 
struct  simplify_type
 
struct  simplify_type< const From >
 
struct  simplify_type< const MDOperand >
 
struct  simplify_type< const TrackingMDRef >
 
struct  simplify_type< const TypedTrackingMDRef< T > >
 
struct  simplify_type< const Use >
 
struct  simplify_type< const WeakTrackingVH >
 
struct  simplify_type< const WeakVH >
 
struct  simplify_type< MDOperand >
 
struct  simplify_type< TrackingMDRef >
 
struct  simplify_type< TypedTrackingMDRef< T > >
 
struct  simplify_type< Use >
 Allow clients to treat uses just like values when using casting operators. More...
 
struct  simplify_type< User::const_op_iterator >
 
struct  simplify_type< User::op_iterator >
 
struct  simplify_type< WeakTrackingVH >
 
struct  simplify_type< WeakVH >
 
struct  SimplifyCFGOptions
 A set of parameters used to control the transforms in the SimplifyCFG pass. More...
 
class  SimplifyCFGPass
 A pass to simplify and canonicalize the CFG of a function. More...
 
struct  SimplifyQuery
 
struct  SinkAndHoistLICMFlags
 
class  SinkingPass
 Move instructions into successor blocks when possible. More...
 
class  SIToFPInst
 This class represents a cast from signed integer to floating point. More...
 
struct  SlotMapping
 This struct contains the mappings from the slot numbers to unnamed metadata nodes, global values and types. More...
 
class  SlotTracker
 This class provides computation of slot numbers for LLVM Assembly writing. More...
 
struct  SLPVectorizerPass
 
class  SmallPtrSetImpl
 
class  SmallString
 
class  SmallVectorImpl
 
class  SmallVectorMemoryBuffer
 SmallVector-backed MemoryBuffer instance. More...
 
class  SMDiagnostic
 Instances of this class encapsulate one diagnostic report, allowing printing to a raw_ostream as a caret diagnostic. More...
 
class  SMFixIt
 Represents a single fixit, a replacement of one range of text with another. More...
 
class  SMLoc
 Represents a location in source code. More...
 
class  SMRange
 Represents a range in source code. More...
 
class  SMTExpr
 Generic base class for SMT exprs. More...
 
class  SMTSolver
 Generic base class for SMT Solvers. More...
 
class  SMTSort
 Generic base class for SMT sorts. More...
 
class  SourceMgr
 This owns the files read by a parser, handles include stacks, and handles diagnostic wrangling. More...
 
class  SparseSolver
 SparseSolver - This class is a general purpose solver for Sparse Conditional Propagation with a programmable lattice function. More...
 
class  SpecialCaseList
 
class  SpecificBumpPtrAllocator
 A BumpPtrAllocator that allows only elements of a specific type to be allocated. More...
 
struct  SpeculateAroundPHIsPass
 This pass handles simple speculating of instructions around PHIs when doing so is profitable for a particular target despite duplicated instructions. More...
 
class  SpeculativeExecutionPass
 
class  SROA
 An optimization pass providing Scalar Replacement of Aggregates. More...
 
class  SSAUpdater
 Helper class for SSA formation on a set of values defined in multiple blocks. More...
 
class  SSAUpdaterBulk
 Helper class for SSA formation on a set of values defined in multiple blocks. More...
 
class  SSAUpdaterImpl
 
class  SSAUpdaterTraits
 
class  SSAUpdaterTraits< SSAUpdater >
 
class  StackSafetyAnalysis
 StackSafetyInfo wrapper for the new pass manager. More...
 
class  StackSafetyGlobalAnalysis
 This pass performs the global (interprocedural) stack safety analysis (new pass manager). More...
 
class  StackSafetyGlobalInfoWrapperPass
 This pass performs the global (interprocedural) stack safety analysis (legacy pass manager). More...
 
class  StackSafetyGlobalPrinterPass
 Printer pass for the StackSafetyGlobalAnalysis results. More...
 
class  StackSafetyInfo
 Interface to access stack safety analysis results for single function. More...
 
class  StackSafetyInfoWrapperPass
 StackSafetyInfo wrapper for the legacy pass manager. More...
 
class  StackSafetyPrinterPass
 Printer pass for the StackSafetyAnalysis results. More...
 
class  StandardInstrumentations
 This class provides an interface to register all the standard pass instrumentations and manages their state (if any). More...
 
class  Statepoint
 A specialization of it's base class for read-write access to a gc.statepoint. More...
 
class  StatepointBase
 A wrapper around a GC intrinsic call, this provides most of the actual functionality for Statepoint and ImmutableStatepoint. More...
 
struct  StatepointDirectives
 Call sites that get wrapped by a gc.statepoint (currently only in RewriteStatepointsForGC and potentially in other passes in the future) can have attributes that describe properties of gc.statepoint call they will be eventually be wrapped in. More...
 
class  StoreInfo
 
class  StoreInst
 An instruction for storing to memory. More...
 
class  StringAttributeImpl
 
class  StringError
 This class wraps a string in an Error. More...
 
class  StringMapEntry
 
class  StringPool
 StringPool - An interned string pool. More...
 
class  StringSaver
 Saves strings in the provided stable storage and returns a StringRef with a stable character pointer. More...
 
struct  StripDeadPrototypesPass
 Pass to remove unused function declarations. More...
 
struct  StrOffsetsContributionDescriptor
 Represents base address of the CU. More...
 
class  StructLayout
 Used to lazily calculate structure layout information for a target machine, based on the DataLayout structure. More...
 
class  StructType
 Class to represent struct types. More...
 
class  SubOperator
 
class  SuccIterator
 
class  SwitchInst
 Multiway switch. More...
 
class  SwitchInstProfUpdateWrapper
 A wrapper class to simplify modification of SwitchInst cases along with their prof branch_weights metadata. More...
 
class  SymbolRemappingParseError
 
class  SymbolRemappingReader
 Reader for symbol remapping files. More...
 
class  SymbolTableList
 List that automatically updates parent links and symbol tables. More...
 
struct  SymbolTableListParentType
 Template metafunction to get the parent type for a symbol table list. More...
 
class  SymbolTableListTraits
 
class  SyncDependenceAnalysis
 Relates points of divergent control to join points in reducible CFGs. More...
 
class  SyntheticCountsPropagation
 
class  SyntheticCountsUtils
 Class with methods to propagate synthetic entry counts. More...
 
struct  TailCallElimPass
 
class  Target
 Target - Wrapper for Target specific information. More...
 
class  TargetFolder
 TargetFolder - Create constants with target dependent folding. More...
 
class  TargetIRAnalysis
 Analysis pass providing the TargetTransformInfo. More...
 
class  TargetLibraryAnalysis
 Analysis pass providing the TargetLibraryInfo. More...
 
class  TargetLibraryInfo
 Provides information about what library functions are available for the current target. More...
 
class  TargetLibraryInfoImpl
 Implementation of the target library information. More...
 
class  TargetLibraryInfoWrapperPass
 
struct  TargetMachineBuilder
 Helper to gather options relevant to the target machine creation. More...
 
struct  TargetRegistry
 TargetRegistry - Generic interface to target specific features. More...
 
class  TargetTransformInfo
 This pass provides access to the codegen interfaces that are needed for IR-level transformations. More...
 
class  TargetTransformInfoImplBase
 Base class for use as a mix-in that aids implementing a TargetTransformInfo-compatible class. More...
 
class  TargetTransformInfoImplCRTPBase
 CRTP base class for use as a mix-in that aids implementing a TargetTransformInfo-compatible class. More...
 
class  TargetTransformInfoWrapperPass
 Wrapper pass for TargetTransformInfo. More...
 
class  TarWriter
 
class  TaskQueue
 TaskQueue executes serialized work on a user-defined Thread Pool. More...
 
class  TBAAVerifier
 Verify that the TBAA Metadatas are valid. More...
 
struct  TempMDNodeDeleter
 
class  ThinLTOBitcodeWriterPass
 
class  ThinLTOCodeGenerator
 This class define an interface similar to the LTOCodeGenerator, but adapted for ThinLTO processing. More...
 
class  ThreadPool
 A ThreadPool for asynchronous parallel execution on a defined number of threads. More...
 
struct  ThreadSanitizerPass
 A function pass for tsan instrumentation. More...
 
class  TimePassesHandler
 This class implements -time-passes functionality for new pass manager. More...
 
class  Timer
 This class is used to track the amount of time spent between invocations of its startTimer()/stopTimer() methods. More...
 
class  TimeRecord
 
class  TimeRegion
 The TimeRegion class is used as a helper class to call the startTimer() and stopTimer() methods of the Timer class. More...
 
class  TimerGroup
 The TimerGroup class is used to group together related timers into a single report that is printed when the TimerGroup is destroyed. More...
 
struct  TimeTraceProfiler
 
struct  TimeTraceScope
 The TimeTraceScope is a helper class to call the begin and end functions of the time trace profiler. More...
 
class  ToolOutputFile
 This class contains a raw_fd_ostream and adds a few extra features commonly needed for compiler-like tool output files: More...
 
class  Trace
 
class  TrackingMDRef
 Tracking metadata reference. More...
 
class  TrackingVH
 Value handle that tracks a Value across RAUW. More...
 
class  TrailingObjects
 See the file comment for details on the usage of the TrailingObjects type. More...
 
class  TrigramIndex
 
class  TruncInst
 This class represents a truncation of integer types. More...
 
class  TruncInstCombine
 
class  Type
 The instances of the Type class are immutable: once they are created, they are never changed. More...
 
class  TypeAttributeImpl
 
class  TypeBasedAA
 Analysis pass providing a never-invalidated alias analysis result. More...
 
class  TypeBasedAAResult
 A simple AA result that uses TBAA metadata to answer queries. More...
 
class  TypeBasedAAWrapperPass
 Legacy wrapper pass to provide the TypeBasedAAResult object. More...
 
class  TypedMDOperandIterator
 Typed iterator through MDNode operands. More...
 
class  TypedTrackingMDRef
 Typed tracking ref. More...
 
class  TypeFinder
 TypeFinder - Walk over a module, identifying all of the types that are used by the module. More...
 
struct  TypeIdOffsetVtableInfo
 The following data structures summarize type metadata information. More...
 
struct  TypeIdSummary
 
struct  TypeTestResolution
 
class  UDivOperator
 
struct  Uint24
 An auxiliary type to facilitate extraction of 3-byte entities. More...
 
class  UIToFPInst
 This class represents a cast unsigned integer to floating point. More...
 
class  UnaryConstantExpr
 UnaryConstantExpr - This class is private to Constants.cpp, and is used behind the scenes to implement unary constant exprs. More...
 
class  UnaryInstruction
 
class  UnaryOperator
 
class  UndefValue
 'undef' values are things that do not have specified contents. More...
 
struct  UnifyFunctionExitNodes
 
class  unique_lock
 A pared-down imitation of std::unique_lock from C++11. More...
 
class  UniqueStringSaver
 Saves strings in the provided stable storage and returns a StringRef with a stable character pointer. More...
 
class  UnreachableInst
 This function has undefined behavior. More...
 
class  UnrolledInstAnalyzer
 
struct  UnrollLoopOptions
 
class  upward_defs_iterator
 Provide an iterator that walks defs, giving both the memory access, and the current pointer location, updating the pointer location as it changes due to phi node translation. More...
 
class  Use
 A Use represents the edge between a Value definition and its users. More...
 
struct  UseListOrder
 Structure to hold a use-list order. More...
 
class  User
 
class  VAArgInst
 This class represents the va_arg llvm instruction, which returns an argument of the specified type given a va_list and increments that list. More...
 
class  VACopyInst
 This represents the llvm.va_copy intrinsic. More...
 
class  VAEndInst
 This represents the llvm.va_end intrinsic. More...
 
struct  ValID
 ValID - Represents a reference of a definition of some sort with no type. More...
 
struct  validate_format_parameters
 These are templated helper classes used by the format function that capture the object to be formatted and the format string. More...
 
struct  validate_format_parameters< Arg, Args... >
 
struct  validate_format_parameters<>
 
class  Value
 LLVM Value Representation. More...
 
class  ValueAsMetadata
 Value wrapper in the Metadata hierarchy. More...
 
struct  ValueDeleter
 
class  ValueHandleBase
 This is the common base class of value handles. More...
 
struct  ValueInfo
 Struct that holds a reference to a particular GUID in a global value summary. More...
 
class  ValueLatticeElement
 
class  ValueMap
 See the file comment. More...
 
class  ValueMapCallbackVH
 
struct  ValueMapConfig
 This class defines the default behavior for configurable aspects of ValueMap<>. More...
 
class  ValueMapConstIterator
 
class  ValueMapIterator
 
class  ValueMapper
 Context for (re-)mapping values (and metadata). More...
 
class  ValueMapTypeRemapper
 This is a class that can be implemented by clients to remap types when cloning constants and instructions. More...
 
class  ValueMaterializer
 This is a class that can be implemented by clients to materialize Values on demand. More...
 
class  ValueSymbolTable
 This class provides a symbol table of name/value pairs. More...
 
struct  VariadicOperandTraits
 VariadicOperandTraits - determine the allocation regime of the Use array when it is a prefix to the User object, and the number of Use objects is only known at allocation time. More...
 
class  VarStreamArray
 
struct  VarStreamArrayExtractor
 VarStreamArrayExtractor is intended to be specialized to provide customized extraction logic. More...
 
struct  VarStreamArrayExtractor< codeview::CrossModuleImportItem >
 
struct  VarStreamArrayExtractor< codeview::CVRecord< Kind > >
 
struct  VarStreamArrayExtractor< codeview::DebugSubsectionRecord >
 
struct  VarStreamArrayExtractor< codeview::FileChecksumEntry >
 
struct  VarStreamArrayExtractor< codeview::InlineeSourceLine >
 
struct  VarStreamArrayExtractor< pdb::DbiModuleDescriptor >
 
class  VarStreamArrayIterator
 VarStreamArray represents an array of variable length records backed by a stream. More...
 
class  VAStartInst
 This represents the llvm.va_start intrinsic. More...
 
struct  VecDesc
 Describes a possible vectorization of a function. More...
 
struct  VectorizationFactor
 TODO: The following VectorizationFactor was pulled out of LoopVectorizationCostModel class. More...
 
struct  VectorizeConfig
 Vectorize configuration. More...
 
struct  VectorizerParams
 Collection of parameters shared beetween the Loop Vectorizer and the Loop Access Analysis. More...
 
struct  VectorizerValueMap
 This is a helper struct for maintaining vectorization state. More...
 
class  VectorType
 Class to represent vector types. More...
 
class  VerifierAnalysis
 Check a module for errors, and report separate error states for IR and debug info errors. More...
 
class  VerifierPass
 Create a verifier pass. More...
 
struct  VerifierSupport
 
class  VersionTuple
 Represents a version number in the form major[.minor[.subminor[.build]]]. More...
 
struct  VFRange
 A range of powers-of-2 vectorization factors with fixed start and adjustable end. More...
 
struct  VirtFuncOffset
 The ValueInfo and offset for a function within a vtable definition initializer array. More...
 
class  VPBasicBlock
 VPBasicBlock serves as the leaf of the Hierarchical Control-Flow Graph. More...
 
class  VPBlendRecipe
 A recipe for vectorizing a phi-node as a sequence of mask-based select instructions. More...
 
class  VPBlockBase
 VPBlockBase is the building block of the Hierarchical Control-Flow Graph. More...
 
class  VPBlockUtils
 Class that provides utilities for VPBlockBases in VPlan. More...
 
class  VPBranchOnMaskRecipe
 A recipe for generating conditional branches on the bits of a mask. More...
 
class  VPBuilder
 VPlan-based builder utility analogous to IRBuilder. More...
 
struct  VPCallback
 This class is used to enable the VPlan to invoke a method of ILV. More...
 
class  VPInstruction
 This is a concrete Recipe that models a single VPlan-level instruction. More...
 
class  VPInterleavedAccessInfo
 
class  VPInterleaveRecipe
 VPInterleaveRecipe is a recipe for transforming an interleave group of load or stores into one wide load/store and shuffles. More...
 
struct  VPIteration
 In what follows, the term "input IR" refers to code that is fed into the vectorizer whereas the term "output IR" refers to code that is generated by the vectorizer. More...
 
class  VPlan
 VPlan models a candidate for vectorization, encoding various decisions take to produce efficient output IR, including which branches, basic-blocks and output IR instructions to generate, and their cost. More...
 
class  VPlanHCFGBuilder
 Main class to build the VPlan H-CFG for an incoming IR. More...
 
class  VPlanHCFGTransforms
 
struct  VPlanIngredient
 
class  VPlanPredicator
 
class  VPlanPrinter
 VPlanPrinter prints a given VPlan to a given output stream. More...
 
class  VPlanSlp
 Class that maps (parts of) an existing VPlan to trees of combined VPInstructions. More...
 
class  VPlanVerifier
 Class with utility functions that can be used to check the consistency and invariants of a VPlan, including the components of its H-CFG. More...
 
class  VPLoop
 Hold analysis information for every loop detected by VPLoopInfo. More...
 
class  VPPredInstPHIRecipe
 VPPredInstPHIRecipe is a recipe for generating the phi nodes needed when control converges back from a Branch-on-Mask. More...
 
class  VPRecipeBase
 VPRecipeBase is a base class modeling a sequence of one or more output IR instructions. More...
 
class  VPRecipeBuilder
 Helper class to create VPRecipies from IR instructions. More...
 
class  VPRegionBlock
 VPRegionBlock represents a collection of VPBasicBlocks and VPRegionBlocks which form a Single-Entry-Single-Exit subgraph of the output IR CFG. More...
 
class  VPReplicateRecipe
 VPReplicateRecipe replicates a given instruction producing multiple scalar copies of the original scalar type, one per lane, instead of producing a single copy of widened type for all lanes. More...
 
struct  VPTransformState
 VPTransformState holds information passed down when "executing" a VPlan, needed for generating the output IR. More...
 
class  VPUser
 This class augments VPValue with operands which provide the inverse def-use edges from VPValue's users to their defs. More...
 
class  VPValue
 
class  VPWidenIntOrFpInductionRecipe
 A recipe for handling phi nodes of integer and floating-point inductions, producing their vector and scalar values. More...
 
class  VPWidenMemoryInstructionRecipe
 A Recipe for widening load/store operations. More...
 
class  VPWidenPHIRecipe
 A recipe for handling all phi nodes except for integer and FP inductions. More...
 
class  VPWidenRecipe
 VPWidenRecipe is a recipe for producing a copy of vector type for each Instruction in its ingredients independently, in order. More...
 
class  WarnMissedTransformationsPass
 
class  WeakTrackingVH
 Value handle that is nullable, but tries to track the Value. More...
 
class  WeakVH
 A nullable Value handle that is nullable. More...
 
struct  WholeProgramDevirtPass
 
struct  WholeProgramDevirtResolution
 
class  WithColor
 An RAII object that temporarily switches an output stream to a specific color. More...
 
class  WithOverflowInst
 Represents an op.with.overflow intrinsic. More...
 
class  WritableBinaryStream
 A BinaryStream which can be read from as well as written to. More...
 
class  WritableBinaryStreamRef
 
class  WritableMemoryBuffer
 This class is an extension of MemoryBuffer, which allows copy-on-write access to the underlying contents. More...
 
class  WriteThroughMemoryBuffer
 This class is an extension of MemoryBuffer, which allows write access to the underlying contents and committing those changes to the original source. More...
 
class  ZExtInst
 This class represents zero extension of integer types. More...
 
class  ZExtOperator
 

Typedefs

using AliasAnalysis = AAResults
 Temporary typedef for legacy code that uses a generic AliasAnalysis pointer or reference. More...
 
using CGSCCAnalysisManager = AnalysisManager< LazyCallGraph::SCC, LazyCallGraph & >
 The CGSCC analysis manager. More...
 
using CGSCCPassManager = PassManager< LazyCallGraph::SCC, CGSCCAnalysisManager, LazyCallGraph &, CGSCCUpdateResult & >
 The CGSCC pass manager. More...
 
using CGSCCAnalysisManagerModuleProxy = InnerAnalysisManagerProxy< CGSCCAnalysisManager, Module >
 A proxy from a CGSCCAnalysisManager to a Module. More...
 
using ModuleAnalysisManagerCGSCCProxy = OuterAnalysisManagerProxy< ModuleAnalysisManager, LazyCallGraph::SCC, LazyCallGraph & >
 A proxy from a ModuleAnalysisManager to an SCC. More...
 
using CGSCCAnalysisManagerFunctionProxy = OuterAnalysisManagerProxy< CGSCCAnalysisManager, Function >
 A proxy from a CGSCCAnalysisManager to a Function. More...
 
typedef TinyPtrVector< BasicBlock * > ColorVector
 
using function_interval_iterator = IntervalIterator< BasicBlock, Function >
 
using interval_part_interval_iterator = IntervalIterator< Interval, IntervalPartition >
 
using ForwardIDFCalculator = IDFCalculator< false >
 
using ReverseIDFCalculator = IDFCalculator< true >
 
typedef AnalysisManager< Loop, LoopStandardAnalysisResults & > LoopAnalysisManager
 The loop analysis manager. More...
 
typedef InnerAnalysisManagerProxy< LoopAnalysisManager, FunctionLoopAnalysisManagerFunctionProxy
 A proxy from a LoopAnalysisManager to a Function. More...
 
typedef OuterAnalysisManagerProxy< FunctionAnalysisManager, Loop, LoopStandardAnalysisResults & > FunctionAnalysisManagerLoopProxy
 A proxy from a FunctionAnalysisManager to a Loop. More...
 
using SizeOffsetType = std::pair< APInt, APInt >
 
using SizeOffsetEvalType = std::pair< Value *, Value * >
 
using memoryaccess_def_iterator = memoryaccess_def_iterator_base< MemoryAccess >
 
using const_memoryaccess_def_iterator = memoryaccess_def_iterator_base< const MemoryAccess >
 
using MemoryAccessPair = std::pair< MemoryAccess *, MemoryLocation >
 
using ConstMemoryAccessPair = std::pair< const MemoryAccess *, MemoryLocation >
 
using ValueToValueMapTy = ValueMap< const Value *, WeakTrackingVH >
 
using PhiToDefMap = SmallDenseMap< MemoryPhi *, MemoryAccess * >
 
using CFGUpdate = cfg::Update< BasicBlock * >
 
using GraphDiffInvBBPair = std::pair< const GraphDiff< BasicBlock * > *, Inverse< BasicBlock * > >
 
using ValueToValueMap = DenseMap< const Value *, Value * >
 
using LoopToScevMapT = DenseMap< const Loop *, const SCEV * >
 
typedef SmallPtrSet< const Loop *, 2 > PostIncLoopSet
 
typedef function_ref< bool(const SCEVAddRecExpr *)> NormalizePredTy
 
using StackSafetyGlobalInfo = std::map< const GlobalValue *, StackSafetyInfo >
 
using ConstBlockSet = SmallPtrSet< const BasicBlock *, 4 >
 
using DILineInfoTable = SmallVector< std::pair< uint64_t, DILineInfo >, 16 >
 
using DWARFAddressRangesVector = std::vector< DWARFAddressRange >
 DWARFAddressRangesVector - represents a set of absolute address ranges. More...
 
using RelocAddrMap = DenseMap< uint64_t, RelocAddrEntry >
 In place of applying the relocations to the data we've read from disk we use a separate mapping table to the side and checking that at locations in the dwarf where we expect relocated values. More...
 
using pred_iterator = PredIterator< BasicBlock, Value::user_iterator >
 
using const_pred_iterator = PredIterator< const BasicBlock, Value::const_user_iterator >
 
using pred_range = iterator_range< pred_iterator >
 
using pred_const_range = iterator_range< const_pred_iterator >
 
using succ_iterator = SuccIterator< Instruction, BasicBlock >
 
using succ_const_iterator = SuccIterator< const Instruction, const BasicBlock >
 
using succ_range = iterator_range< succ_iterator >
 
using succ_const_range = iterator_range< succ_const_iterator >
 
using DiagnosticHandlerFunction = std::function< void(const DiagnosticInfo &)>
 
using DomTreeNode = DomTreeNodeBase< BasicBlock >
 
using gep_type_iterator = generic_gep_type_iterator<>
 
using inst_iterator = InstIterator< SymbolTableList< BasicBlock >, Function::iterator, BasicBlock::iterator, Instruction >
 
using const_inst_iterator = InstIterator< const SymbolTableList< BasicBlock >, Function::const_iterator, BasicBlock::const_iterator, const Instruction >
 
using inst_range = iterator_range< inst_iterator >
 
using const_inst_range = iterator_range< const_inst_iterator >
 
using OperandBundleDef = OperandBundleDefT< Value * >
 
using ConstOperandBundleDef = OperandBundleDefT< const Value * >
 
using GlobalValueSummaryList = std::vector< std::unique_ptr< GlobalValueSummary > >
 
using GlobalValueSummaryMapTy = std::map< GlobalValue::GUID, GlobalValueSummaryInfo >
 Map from global value GUID to corresponding summary structures. More...
 
using VTableFuncList = std::vector< VirtFuncOffset >
 List of functions referenced by a particular vtable definition. More...
 
using ModuleHash = std::array< uint32_t, 5 >
 160 bits SHA1 More...
 
using const_gvsummary_iterator = GlobalValueSummaryMapTy::const_iterator
 Type used for iterating through the global value summary map. More...
 
using gvsummary_iterator = GlobalValueSummaryMapTy::iterator
 
using ModulePathStringTableTy = StringMap< std::pair< uint64_t, ModuleHash > >
 String table to hold/own module path strings, which additionally holds the module ID assigned to each module during the plugin step, as well as a hash of the module. More...
 
using GVSummaryMapTy = DenseMap< GlobalValue::GUID, GlobalValueSummary * >
 Map of global value GUID to its summary, used to identify values defined in a particular module, and provide efficient access to their summary. More...
 
using TypeIdSummaryMapTy = std::multimap< GlobalValue::GUID, std::pair< std::string, TypeIdSummary > >
 Map of a type GUID to type id string and summary (multimap used in case of GUID conflicts). More...
 
using TypeIdCompatibleVtableInfo = std::vector< TypeIdOffsetVtableInfo >
 List of vtable definitions decorated by a particular type identifier, and their corresponding offsets in that type identifier's metadata. More...
 
using ModulePassManager = PassManager< Module >
 Convenience typedef for a pass manager over modules. More...
 
using FunctionPassManager = PassManager< Function >
 Convenience typedef for a pass manager over functions. More...
 
using ModuleAnalysisManager = AnalysisManager< Module >
 Convenience typedef for the Module analysis manager. More...
 
using FunctionAnalysisManager = AnalysisManager< Function >
 Convenience typedef for the Function analysis manager. More...
 
using FunctionAnalysisManagerModuleProxy = InnerAnalysisManagerProxy< FunctionAnalysisManager, Module >
 Provide the FunctionAnalysisManager to Module proxy. More...
 
using ModuleAnalysisManagerFunctionProxy = OuterAnalysisManagerProxy< ModuleAnalysisManager, Function >
 Provide the ModuleAnalysisManager to Function proxy. More...
 
using SummaryEntryVector = std::vector< ProfileSummaryEntry >
 
using TrackingMDNodeRef = TypedTrackingMDRef< MDNode >
 
using TrackingValueAsMetadataRef = TypedTrackingMDRef< ValueAsMetadata >
 
using UseListOrderStack = std::vector< UseListOrder >
 
using ValueName = StringMapEntry< Value * >
 
using unique_value = std::unique_ptr< Value, ValueDeleter >
 Use this instead of std::unique_ptr<Value> or std::unique_ptr<Instruction>. More...
 
typedef BumpPtrAllocatorImpl BumpPtrAllocator
 The standard BumpPtrAllocator which just uses the default template parameters. More...
 
typedef unsigned int UTF32
 
typedef unsigned short UTF16
 
typedef unsigned char UTF8
 
typedef unsigned char Boolean
 
using uint24_t = Uint24
 
typedef void(* fatal_error_handler_t) (void *user_data, const std::string &reason, bool gen_crash_diag)
 An error handler callback. More...
 
using binop_eval_t = uint64_t(*)(uint64_t, uint64_t)
 Type of functions evaluating a given binary operation. More...
 
template<typename T >
using DomTreeBase = DominatorTreeBase< T, false >
 
template<typename T >
using PostDomTreeBase = DominatorTreeBase< T, true >
 
using DictScope = DelimitedScope<'{', '}'>
 
using ListScope = DelimitedScope<'[', ']'>
 
using SMTSortRef = const SMTSort *
 Shared pointer for SMTSorts, used by SMTSolver API. More...
 
using SMTExprRef = const SMTExpr *
 Shared pointer for SMTExprs, used by SMTSolver API. More...
 
using SMTSolverRef = std::shared_ptr< SMTSolver >
 Shared pointer for SMTSolvers. More...
 
typedef std::thread thread
 
typedef std::once_flag once_flag
 
using LoadStorePair = std::pair< Instruction *, Instruction * >
 
typedef PassManager< Loop, LoopAnalysisManager, LoopStandardAnalysisResults &, LPMUpdater & > LoopPassManager
 The Loop pass manager. More...
 
template<typename AnalysisT >
using RequireAnalysisLoopPass = RequireAnalysisPass< AnalysisT, Loop, LoopAnalysisManager, LoopStandardAnalysisResults &, LPMUpdater & >
 An alias template to easily name a require analysis loop pass. More...
 
using NewLoopsMap = SmallDenseMap< const Loop *, Loop *, 4 >
 
using BFIDOTGTraitsBase = BFIDOTGraphTraitsBase< BlockFrequencyInfo, BranchProbabilityInfo >
 
using FunctionRPOT = ReversePostOrderTraversal< const Function * >
 
typedef std::vector< DWARFExpression::Operation::DescriptionDescVector
 
using IndexAttrPair = std::pair< unsigned, AttributeSet >
 
typedef duration< steady_clock::rep, steady_clock::period > DurationType
 
typedef std::pair< size_t, DurationTypeCountAndDurationType
 
typedef std::pair< std::string, CountAndDurationTypeNameAndCountAndDurationType
 
typedef ScopedHandle< CommonHandleTraitsScopedCommonHandle
 
typedef ScopedHandle< FileHandleTraitsScopedFileHandle
 
typedef ScopedHandle< CryptContextTraitsScopedCryptContext
 
typedef ScopedHandle< RegTraitsScopedRegHandle
 
typedef ScopedHandle< FindHandleTraitsScopedFindHandle
 
typedef ScopedHandle< JobHandleTraitsScopedJobHandle
 
using BBSideEffectsSet = DenseMap< const BasicBlock *, bool >
 
using SmallVecInsn = SmallVector< Instruction *, 4 >
 
using SmallVecImplInsn = SmallVectorImpl< Instruction * >
 
using HoistingPointInfo = std::pair< BasicBlock *, SmallVecInsn >
 
using HoistingPointList = SmallVector< HoistingPointInfo, 4 >
 
using VNType = std::pair< unsigned, unsigned >
 
using VNtoInsns = DenseMap< VNType, SmallVector< Instruction *, 4 > >
 
using CHIIt = SmallVectorImpl< CHIArg >::iterator
 
using CHIArgs = iterator_range< CHIIt >
 
using OutValuesType = DenseMap< BasicBlock *, SmallVector< CHIArg, 2 > >
 
using InValuesType = DenseMap< BasicBlock *, SmallVector< std::pair< VNType, Instruction * >, 2 > >
 
using VPlanPtr = std::unique_ptr< VPlan >
 
using VPDominatorTree = DomTreeBase< VPBlockBase >
 Template specialization of the standard LLVM dominator tree utility for VPBlockBases. More...
 
using VPDomTreeNode = DomTreeNodeBase< VPBlockBase >
 
typedef LoopInfoBase< VPBlockBase, VPLoopVPLoopInfo
 VPLoopInfo provides analysis of natural loop for VPBlockBase-based Hierarchical CFG. More...
 
typedef DenseMap< Value *, VPValue * > Value2VPValueTy
 
typedef DenseMap< VPValue *, Value * > VPValue2ValueTy
 

Enumerations

enum  AliasResult : uint8_t { NoAlias = 0 , MayAlias , PartialAlias , MustAlias }
 The possible results of an alias query. More...
 
enum class  ModRefInfo : uint8_t {
  Must = 0 , MustRef = 1 , MustMod = 2 , MustModRef = MustRef | MustMod ,
  NoModRef = 4 , Ref = NoModRef | MustRef , Mod = NoModRef | MustMod , ModRef = Ref | Mod
}
 Flags indicating whether a memory access modifies or references memory. More...
 
enum  FunctionModRefLocation { FMRL_Nowhere = 0 , FMRL_ArgumentPointees = 8 , FMRL_InaccessibleMem = 16 , FMRL_Anywhere = 32 | FMRL_InaccessibleMem | FMRL_ArgumentPointees }
 The locations at which a function might access memory. More...
 
enum  FunctionModRefBehavior {
  FMRB_DoesNotAccessMemory , FMRB_OnlyReadsArgumentPointees , FMRB_OnlyAccessesArgumentPointees , FMRB_OnlyAccessesInaccessibleMem ,
  FMRB_OnlyAccessesInaccessibleOrArgMem , FMRB_OnlyReadsMemory = FMRL_Anywhere | static_cast<int>(ModRefInfo::Ref) , FMRB_DoesNotReadMemory = FMRL_Anywhere | static_cast<int>(ModRefInfo::Mod) , FMRB_UnknownModRefBehavior
}
 Summary of how a function affects memory in the program. More...
 
enum  PGOViewCountsType { PGOVCT_None , PGOVCT_Graph , PGOVCT_Text }
 
enum  GVDAGType { GVDT_None , GVDT_Fraction , GVDT_Integer , GVDT_Count }
 
enum class  EHPersonality {
  Unknown , GNU_Ada , GNU_C , GNU_C_SjLj ,
  GNU_CXX , GNU_CXX_SjLj , GNU_ObjC , MSVC_X86SEH ,
  MSVC_Win64SEH , MSVC_CXX , CoreCLR , Rust ,
  Wasm_CXX
}
 
enum  : unsigned { INVALID_MEMORYACCESS_ID = -1U }
 
enum  SCEVTypes {
  scConstant , scTruncate , scZeroExtend , scSignExtend ,
  scAddExpr , scMulExpr , scUDivExpr , scAddRecExpr ,
  scUMaxExpr , scSMaxExpr , scUMinExpr , scSMinExpr ,
  scUnknown , scCouldNotCompute
}
 
enum  LibFunc { NumLibFuncs }
 
enum  CfiFunctionLinkage { CFL_Definition = 0 , CFL_Declaration = 1 , CFL_WeakDeclaration = 2 }
 The type of CFI jumptable needed for a function. More...
 
enum class  OverflowResult { AlwaysOverflowsLow , AlwaysOverflowsHigh , MayOverflow , NeverOverflows }
 
enum  SelectPatternFlavor {
  SPF_UNKNOWN = 0 , SPF_SMIN , SPF_UMIN , SPF_SMAX ,
  SPF_UMAX , SPF_FMINNUM , SPF_FMAXNUM , SPF_ABS ,
  SPF_NABS
}
 Specific patterns of select instructions we can match. More...
 
enum  SelectPatternNaNBehavior { SPNB_NA = 0 , SPNB_RETURNS_NAN , SPNB_RETURNS_OTHER , SPNB_RETURNS_ANY }
 Behavior when a floating point min/max is given one NaN and one non-NaN as input. More...
 
enum class  DINameKind { None , ShortName , LinkageName }
 A DINameKind is passed to name search methods to specify a preference regarding the type of name resolution the caller wants. More...
 
enum  DIDumpTypeCounter { DIDT_ID_UUID , DIDT_ID_Count }
 This is just a helper to programmatically construct DIDumpType. More...
 
enum  DIDumpType : unsigned { DIDT_Null , DIDT_All = ~0U , DIDT_UUID = 1 << DIDT_ID_UUID }
 Selects which debug sections get dumped. More...
 
enum class  ErrorPolicy { Halt , Continue }
 Used as a return value for a error callback passed to DWARF context. More...
 
enum  DWARFSectionKind {
  DW_SECT_INFO = 1 , DW_SECT_TYPES , DW_SECT_ABBREV , DW_SECT_LINE ,
  DW_SECT_LOC , DW_SECT_STR_OFFSETS , DW_SECT_MACINFO , DW_SECT_MACRO
}
 
enum  AlignTypeEnum {
  INVALID_ALIGN = 0 , INTEGER_ALIGN = 'i' , VECTOR_ALIGN = 'v' , FLOAT_ALIGN = 'f' ,
  AGGREGATE_ALIGN = 'a'
}
 Enum used to categorize the alignment types stored by LayoutAlignElem. More...
 
enum  DiagnosticSeverity : char { DS_Error , DS_Warning , DS_Remark , DS_Note }
 Defines the different supported severity of a diagnostic. More...
 
enum  DiagnosticKind {
  DK_InlineAsm , DK_ResourceLimit , DK_StackSize , DK_Linker ,
  DK_DebugMetadataVersion , DK_DebugMetadataInvalid , DK_ISelFallback , DK_SampleProfile ,
  DK_OptimizationRemark , DK_OptimizationRemarkMissed , DK_OptimizationRemarkAnalysis , DK_OptimizationRemarkAnalysisFPCommute ,
  DK_OptimizationRemarkAnalysisAliasing , DK_OptimizationFailure , DK_FirstRemark = DK_OptimizationRemark , DK_LastRemark = DK_OptimizationFailure ,
  DK_MachineOptimizationRemark , DK_MachineOptimizationRemarkMissed , DK_MachineOptimizationRemarkAnalysis , DK_FirstMachineRemark = DK_MachineOptimizationRemark ,
  DK_LastMachineRemark = DK_MachineOptimizationRemarkAnalysis , DK_MIRParser , DK_PGOProfile , DK_Unsupported ,
  DK_FirstPluginKind
}
 Defines the different supported kind of a diagnostic. More...
 
enum  PassDebuggingString {
  EXECUTION_MSG , MODIFICATION_MSG , FREEING_MSG , ON_BASICBLOCK_MSG ,
  ON_FUNCTION_MSG , ON_MODULE_MSG , ON_REGION_MSG , ON_LOOP_MSG ,
  ON_CG_MSG
}
 
enum  LLVMConstants : uint32_t { DEBUG_METADATA_VERSION = 3 }
 
enum class  StatepointFlags { None = 0 , GCTransition = 1 , DeoptLiveIn = 2 , MaskAll = 3 }
 The statepoint intrinsic accepts a set of flags as its third argument. More...
 
enum class  AtomicOrderingCABI {
  relaxed = 0 , consume = 1 , acquire = 2 , release = 3 ,
  acq_rel = 4 , seq_cst = 5
}
 Atomic ordering for C11 / C++11's memody models. More...
 
enum class  AtomicOrdering {
  NotAtomic = 0 , Unordered = 1 , Monotonic = 2 , Acquire = 4 ,
  Release = 5 , AcquireRelease = 6 , SequentiallyConsistent = 7
}
 Atomic ordering for LLVM's memory model. More...
 
enum  BinaryStreamFlags { BSF_None = 0 , BSF_Write = 1 , BSF_Append = 2 }
 
enum class  stream_error_code {
  unspecified , stream_too_short , invalid_array_size , invalid_offset ,
  filesystem_error
}
 
enum  ConversionResult { conversionOK , sourceExhausted , targetExhausted , sourceIllegal }
 
enum  ConversionFlags { strictConversion = 0 , lenientConversion }
 
enum class  errc {
  argument_list_too_long = int(std::errc::argument_list_too_long) , argument_out_of_domain = int(std::errc::argument_out_of_domain) , bad_address = int(std::errc::bad_address) , bad_file_descriptor = int(std::errc::bad_file_descriptor) ,
  broken_pipe = int(std::errc::broken_pipe) , device_or_resource_busy = int(std::errc::device_or_resource_busy) , directory_not_empty = int(std::errc::directory_not_empty) , executable_format_error = int(std::errc::executable_format_error) ,
  file_exists = int(std::errc::file_exists) , file_too_large = int(std::errc::file_too_large) , filename_too_long = int(std::errc::filename_too_long) , function_not_supported = int(std::errc::function_not_supported) ,
  illegal_byte_sequence = int(std::errc::illegal_byte_sequence) , inappropriate_io_control_operation , interrupted = int(std::errc::interrupted) , invalid_argument = int(std::errc::invalid_argument) ,
  invalid_seek = int(std::errc::invalid_seek) , io_error = int(std::errc::io_error) , is_a_directory = int(std::errc::is_a_directory) , no_child_process = int(std::errc::no_child_process) ,
  no_lock_available = int(std::errc::no_lock_available) , no_space_on_device = int(std::errc::no_space_on_device) , no_such_device_or_address = int(std::errc::no_such_device_or_address) , no_such_device = int(std::errc::no_such_device) ,
  no_such_file_or_directory = int(std::errc::no_such_file_or_directory) , no_such_process = int(std::errc::no_such_process) , not_a_directory = int(std::errc::not_a_directory) , not_enough_memory = int(std::errc::not_enough_memory) ,
  not_supported = int(std::errc::not_supported) , operation_not_permitted = int(std::errc::operation_not_permitted) , permission_denied = int(std::errc::permission_denied) , read_only_file_system = int(std::errc::read_only_file_system) ,
  resource_deadlock_would_occur = int(std::errc::resource_deadlock_would_occur) , resource_unavailable_try_again , result_out_of_range = int(std::errc::result_out_of_range) , too_many_files_open_in_system = int(std::errc::too_many_files_open_in_system) ,
  too_many_files_open = int(std::errc::too_many_files_open) , too_many_links = int(std::errc::too_many_links)
}
 
enum class  AlignStyle { Left , Center , Right }
 
enum class  ReplacementType { Empty , Format , Literal }
 
enum  ZeroBehavior { ZB_Undefined , ZB_Max , ZB_Width }
 The behavior an operation has on an input of 0. More...
 
enum class  FloatStyle { Exponent , ExponentUpper , Fixed , Percent }
 
enum class  IntegerStyle { Integer , Number }
 
enum class  HexPrintStyle { Upper , Lower , PrefixUpper , PrefixLower }
 
enum class  ThreadPriority { Background = 0 , Default = 1 }
 
enum class  SetThreadPriorityResult { FAILURE , SUCCESS }
 If priority is Background tries to lower current threads priority such that it does not affect foreground tasks significantly. More...
 
enum class  HighlightColor {
  Address , String , Tag , Attribute ,
  Enumerator , Macro , Error , Warning ,
  Note , Remark
}
 
enum class  PassSummaryAction { None , Import , Export }
 What to do with the summary when running passes that operate on it. More...
 
enum class  ChangeStatus { CHANGED , UNCHANGED }
 Simple enum class that forces the status to be spelled out explicitly. More...
 
enum  MemoryAccessKind { MAK_ReadNone = 0 , MAK_ReadOnly = 1 , MAK_MayWrite = 2 , MAK_WriteOnly = 3 }
 The three kinds of memory access relevant to 'readonly' and 'readnone' attributes. More...
 
enum class  PrevailingType { Yes , No , Unknown }
 PrevailingType enum used as a return type of callback passed to computeDeadSymbols. More...
 
enum  TransformationMode {
  TM_Unspecified , TM_Enable , TM_Disable , TM_Force = 0x04 ,
  TM_ForcedByUser = TM_Enable | TM_Force , TM_SuppressedByUser = TM_Disable | TM_Force
}
 The mode sets how eager a transformation should be applied. More...
 
enum  PredicateType { PT_Branch , PT_Assume , PT_Switch }
 
enum  { kSanitizerStatKindBits = 3 }
 
enum  SanitizerStatKind {
  SanStat_CFI_VCall , SanStat_CFI_NVCall , SanStat_CFI_DerivedCast , SanStat_CFI_UnrelatedCast ,
  SanStat_CFI_ICall
}
 
enum class  LoopUnrollResult { Unmodified , PartiallyUnrolled , FullyUnrolled }
 Represents the result of a UnrollLoop invocation. More...
 
enum  RemapFlags {
  RF_None = 0 , RF_NoModuleLevelChanges = 1 , RF_IgnoreMissingLocals = 2 , RF_MoveDistinctMDs = 4 ,
  RF_NullMapMissingGlobalValues = 8
}
 These are flags that the value mapping APIs allow. More...
 
enum  : unsigned { InvalidVN = ~2U }
 

Functions

raw_ostreamoperator<< (raw_ostream &OS, AliasResult AR)
 << operator for AliasResult. More...
 
LLVM_NODISCARD bool isNoModRef (const ModRefInfo MRI)
 
LLVM_NODISCARD bool isModOrRefSet (const ModRefInfo MRI)
 
LLVM_NODISCARD bool isModAndRefSet (const ModRefInfo MRI)
 
LLVM_NODISCARD bool isModSet (const ModRefInfo MRI)
 
LLVM_NODISCARD bool isRefSet (const ModRefInfo MRI)
 
LLVM_NODISCARD bool isMustSet (const ModRefInfo MRI)
 
LLVM_NODISCARD ModRefInfo setMod (const ModRefInfo MRI)
 
LLVM_NODISCARD ModRefInfo setRef (const ModRefInfo MRI)
 
LLVM_NODISCARD ModRefInfo setMust (const ModRefInfo MRI)
 
LLVM_NODISCARD ModRefInfo setModAndRef (const ModRefInfo MRI)
 
LLVM_NODISCARD ModRefInfo clearMod (const ModRefInfo MRI)
 
LLVM_NODISCARD ModRefInfo clearRef (const ModRefInfo MRI)
 
LLVM_NODISCARD ModRefInfo clearMust (const ModRefInfo MRI)
 
LLVM_NODISCARD ModRefInfo unionModRef (const ModRefInfo MRI1, const ModRefInfo MRI2)
 
LLVM_NODISCARD ModRefInfo intersectModRef (const ModRefInfo MRI1, const ModRefInfo MRI2)
 
LLVM_NODISCARD ModRefInfo createModRefInfo (const FunctionModRefBehavior FMRB)
 
bool isNoAliasCall (const Value *V)
 Return true if this pointer is returned by a noalias function. More...
 
bool isNoAliasArgument (const Value *V)
 Return true if this is an argument with the noalias attribute. More...
 
bool isIdentifiedObject (const Value *V)
 Return true if this pointer refers to a distinct and identifiable object. More...
 
bool isIdentifiedFunctionLocal (const Value *V)
 Return true if V is umabigously identified at the function-level. More...
 
FunctionPass * createAAResultsWrapperPass ()
 
ImmutablePasscreateExternalAAWrapperPass (std::function< void(Pass &, Function &, AAResults &)> Callback)
 A wrapper pass around a callback which can be used to populate the AAResults in the AAResultsWrapperPass from an external AA. More...
 
AAResults createLegacyPMAAResults (Pass &P, Function &F, BasicAAResult &BAR)
 A helper for the legacy pass manager to create a AAResults object populated to the best of our ability for a particular function when inside of a ModulePass or a CallGraphSCCPass. More...
 
void getAAResultsAnalysisUsage (AnalysisUsage &AU)
 A helper for the legacy pass manager to populate AU to add uses to make sure the analyses required by createLegacyPMAAResults are available. More...
 
FunctionPass * createAAEvalPass ()
 Create a wrapper of the above for the legacy pass manager. More...
 
raw_ostreamoperator<< (raw_ostream &OS, const AliasSet &AS)
 
raw_ostreamoperator<< (raw_ostream &OS, const AliasSetTracker &AST)
 
FunctionPass * createBasicAAWrapperPass ()
 
BasicAAResult createLegacyPMBasicAAResult (Pass &P, Function &F)
 A helper for the legacy pass manager to create a BasicAAResult object populated to the best of our ability for a particular function when inside of a ModulePass or a CallGraphSCCPass. More...
 
uint32_t getWeightFromBranchProb (const BranchProbability Prob)
 
void initializeDummyCGSCCPassPass (PassRegistry &)
 
ModulePasscreateCallGraphViewerPass ()
 
ModulePasscreateCallGraphDOTPrinterPass ()
 
bool PointerMayBeCaptured (const Value *V, bool ReturnCaptures, bool StoreCaptures, unsigned MaxUsesToExplore=DefaultMaxUsesToExplore)
 PointerMayBeCaptured - Return true if this pointer value may be captured by the enclosing function (which is required to exist). More...
 
bool PointerMayBeCapturedBefore (const Value *V, bool ReturnCaptures, bool StoreCaptures, const Instruction *I, const DominatorTree *DT, bool IncludeI=false, OrderedBasicBlock *OBB=nullptr, unsigned MaxUsesToExplore=DefaultMaxUsesToExplore)
 PointerMayBeCapturedBefore - Return true if this pointer value may be captured by the enclosing function (which is required to exist). More...
 
void PointerMayBeCaptured (const Value *V, CaptureTracker *Tracker, unsigned MaxUsesToExplore=DefaultMaxUsesToExplore)
 PointerMayBeCaptured - Visit the value and the values derived from it and find values which appear to be capturing the pointer value. More...
 
void FindFunctionBackedges (const Function &F, SmallVectorImpl< std::pair< const BasicBlock *, const BasicBlock * > > &Result)
 Analyze the specified function to find all of the loop backedges in the function and return them. More...
 
unsigned GetSuccessorNumber (const BasicBlock *BB, const BasicBlock *Succ)
 Search for the specified successor of basic block BB and return its position in the terminator instruction's list of successors. More...
 
bool isCriticalEdge (const Instruction *TI, unsigned SuccNum, bool AllowIdenticalEdges=false)
 Return true if the specified edge is a critical edge. More...
 
bool isPotentiallyReachable (const Instruction *From, const Instruction *To, const SmallPtrSetImpl< BasicBlock * > *ExclusionSet=nullptr, const DominatorTree *DT=nullptr, const LoopInfo *LI=nullptr)
 Determine whether instruction 'To' is reachable from 'From', without passing through any blocks in ExclusionSet, returning true if uncertain. More...
 
bool isPotentiallyReachable (const BasicBlock *From, const BasicBlock *To, const DominatorTree *DT=nullptr, const LoopInfo *LI=nullptr)
 Determine whether block 'To' is reachable from 'From', returning true if uncertain. More...
 
bool isPotentiallyReachableFromMany (SmallVectorImpl< BasicBlock * > &Worklist, BasicBlock *StopBB, const DominatorTree *DT=nullptr, const LoopInfo *LI=nullptr)
 Determine whether there is at least one path from a block in 'Worklist' to 'StopBB', returning true if uncertain. More...
 
bool isPotentiallyReachableFromMany (SmallVectorImpl< BasicBlock * > &Worklist, BasicBlock *StopBB, const SmallPtrSetImpl< BasicBlock * > *ExclusionSet, const DominatorTree *DT=nullptr, const LoopInfo *LI=nullptr)
 Determine whether there is at least one path from a block in 'Worklist' to 'StopBB' without passing through any blocks in 'ExclusionSet', returning true if uncertain. More...
 
template<class NodeT , class RPOTraversalT , class LoopInfoT , class GT = GraphTraits<NodeT>>
bool containsIrreducibleCFG (RPOTraversalT &RPOTraversal, const LoopInfoT &LI)
 Return true if the control flow in RPOTraversal is irreducible. More...
 
FunctionPass * createCFGPrinterLegacyPassPass ()
 
FunctionPass * createCFGOnlyPrinterLegacyPassPass ()
 
ImmutablePasscreateCFLAndersAAWrapperPass ()
 
ImmutablePasscreateCFLSteensAAWrapperPass ()
 
template<typename CGSCCPassT >
ModuleToPostOrderCGSCCPassAdaptor< CGSCCPassT > createModuleToPostOrderCGSCCPassAdaptor (CGSCCPassT Pass)
 A function to deduce a function pass type and wrap it in the templated adaptor. More...
 
LazyCallGraph::SCCupdateCGAndAnalysisManagerForFunctionPass (LazyCallGraph &G, LazyCallGraph::SCC &C, LazyCallGraph::Node &N, CGSCCAnalysisManager &AM, CGSCCUpdateResult &UR)
 Helper to update the call graph after running a function pass. More...
 
template<typename FunctionPassT >
CGSCCToFunctionPassAdaptor< FunctionPassT > createCGSCCToFunctionPassAdaptor (FunctionPassT Pass)
 A function to deduce a function pass type and wrap it in the templated adaptor. More...
 
template<typename PassT >
DevirtSCCRepeatedPass< PassT > createDevirtSCCRepeatedPass (PassT Pass, int MaxIterations)
 A function to deduce a function pass type and wrap it in the templated adaptor. More...
 
unsigned getICmpCode (const ICmpInst *ICI, bool InvertPred=false)
 Encode a icmp predicate into a three bit mask. More...
 
ConstantgetPredForICmpCode (unsigned Code, bool Sign, Type *OpTy, CmpInst::Predicate &Pred)
 This is the complement of getICmpCode. More...
 
bool predicatesFoldable (CmpInst::Predicate P1, CmpInst::Predicate P2)
 Return true if both predicates match sign or if at least one of them is an equality comparison (which is signless). More...
 
bool decomposeBitTestICmp (Value *LHS, Value *RHS, CmpInst::Predicate &Pred, Value *&X, APInt &Mask, bool LookThroughTrunc=true)
 Decompose an icmp into the form ((X & Mask) pred 0) if possible. More...
 
bool IsConstantOffsetFromGlobal (Constant *C, GlobalValue *&GV, APInt &Offset, const DataLayout &DL)
 If this constant is a constant offset from a global, return the global and the constant. More...
 
ConstantConstantFoldInstruction (Instruction *I, const DataLayout &DL, const TargetLibraryInfo *TLI=nullptr)
 ConstantFoldInstruction - Try to constant fold the specified instruction. More...
 
ConstantConstantFoldConstant (const Constant *C, const DataLayout &DL, const TargetLibraryInfo *TLI=nullptr)
 ConstantFoldConstant - Attempt to fold the constant using the specified DataLayout. More...
 
ConstantConstantFoldInstOperands (Instruction *I, ArrayRef< Constant * > Ops, const DataLayout &DL, const TargetLibraryInfo *TLI=nullptr)
 ConstantFoldInstOperands - Attempt to constant fold an instruction with the specified operands. More...
 
ConstantConstantFoldCompareInstOperands (unsigned Predicate, Constant *LHS, Constant *RHS, const DataLayout &DL, const TargetLibraryInfo *TLI=nullptr)
 ConstantFoldCompareInstOperands - Attempt to constant fold a compare instruction (icmp/fcmp) with the specified operands. More...
 
ConstantConstantFoldUnaryOpOperand (unsigned Opcode, Constant *Op, const DataLayout &DL)
 Attempt to constant fold a unary operation with the specified operand. More...
 
ConstantConstantFoldBinaryOpOperands (unsigned Opcode, Constant *LHS, Constant *RHS, const DataLayout &DL)
 Attempt to constant fold a binary operation with the specified operands. More...
 
ConstantConstantFoldSelectInstruction (Constant *Cond, Constant *V1, Constant *V2)
 Attempt to constant fold a select instruction with the specified operands. More...
 
ConstantConstantFoldCastOperand (unsigned Opcode, Constant *C, Type *DestTy, const DataLayout &DL)
 Attempt to constant fold a cast with the specified operand. More...
 
ConstantConstantFoldInsertValueInstruction (Constant *Agg, Constant *Val, ArrayRef< unsigned > Idxs)
 ConstantFoldInsertValueInstruction - Attempt to constant fold an insertvalue instruction with the specified operands and indices. More...
 
ConstantConstantFoldExtractValueInstruction (Constant *Agg, ArrayRef< unsigned > Idxs)
 Attempt to constant fold an extractvalue instruction with the specified operands and indices. More...
 
ConstantConstantFoldInsertElementInstruction (Constant *Val, Constant *Elt, Constant *Idx)
 Attempt to constant fold an insertelement instruction with the specified operands and indices. More...
 
ConstantConstantFoldExtractElementInstruction (Constant *Val, Constant *Idx)
 Attempt to constant fold an extractelement instruction with the specified operands and indices. More...
 
ConstantConstantFoldShuffleVectorInstruction (Constant *V1, Constant *V2, Constant *Mask)
 Attempt to constant fold a shufflevector instruction with the specified operands and indices. More...
 
ConstantConstantFoldLoadFromConstPtr (Constant *C, Type *Ty, const DataLayout &DL)
 ConstantFoldLoadFromConstPtr - Return the value that a load from C would produce if it is constant and determinable. More...
 
ConstantConstantFoldLoadThroughGEPConstantExpr (Constant *C, ConstantExpr *CE)
 ConstantFoldLoadThroughGEPConstantExpr - Given a constant and a getelementptr constantexpr, return the constant value being addressed by the constant expression, or null if something is funny and we can't decide. More...
 
ConstantConstantFoldLoadThroughGEPIndices (Constant *C, ArrayRef< Constant * > Indices)
 ConstantFoldLoadThroughGEPIndices - Given a constant and getelementptr indices (with an implied zero pointer index that is not in the list), return the constant value being addressed by a virtual load, or null if something is funny and we can't decide. More...
 
bool canConstantFoldCallTo (const CallBase *Call, const Function *F)
 canConstantFoldCallTo - Return true if its even possible to fold a call to the specified function. More...
 
ConstantConstantFoldCall (const CallBase *Call, Function *F, ArrayRef< Constant * > Operands, const TargetLibraryInfo *TLI=nullptr)
 ConstantFoldCall - Attempt to constant fold a call to the specified function with the specified arguments, returning null if unsuccessful. More...
 
ConstantConstantFoldLoadThroughBitcast (Constant *C, Type *DestTy, const DataLayout &DL)
 ConstantFoldLoadThroughBitcast - try to cast constant to destination type returning null if unsuccessful. More...
 
bool isMathLibCallNoop (const CallBase *Call, const TargetLibraryInfo *TLI)
 Check whether the given call has no side-effects. More...
 
FunctionPass * createDemandedBitsWrapperPass ()
 Create a demanded bits analysis pass. More...
 
FunctionPass * createDependenceAnalysisWrapperPass ()
 createDependenceAnalysisPass - This creates an instance of the DependenceAnalysis wrapper pass. More...
 
FunctionPass * createDomPrinterPass ()
 
FunctionPass * createDomOnlyPrinterPass ()
 
FunctionPass * createDomViewerPass ()
 
FunctionPass * createDomOnlyViewerPass ()
 
FunctionPass * createPostDomPrinterPass ()
 
FunctionPass * createPostDomOnlyPrinterPass ()
 
FunctionPass * createPostDomViewerPass ()
 
FunctionPass * createPostDomOnlyViewerPass ()
 
EHPersonality classifyEHPersonality (const Value *Pers)
 See if the given exception handling personality function is one that we understand. More...
 
StringRef getEHPersonalityName (EHPersonality Pers)
 
EHPersonality getDefaultEHPersonality (const Triple &T)
 
bool isAsynchronousEHPersonality (EHPersonality Pers)
 Returns true if this personality function catches asynchronous exceptions. More...
 
bool isFuncletEHPersonality (EHPersonality Pers)
 Returns true if this is a personality function that invokes handler funclets (which must return to it). More...
 
bool isScopedEHPersonality (EHPersonality Pers)
 Returns true if this personality uses scope-style EH IR instructions: catchswitch, catchpad/ret, and cleanuppad/ret. More...
 
bool isNoOpWithoutInvoke (EHPersonality Pers)
 Return true if this personality may be safely removed if there are no invoke instructions remaining in the current function. More...
 
bool canSimplifyInvokeNoUnwind (const Function *F)
 
DenseMap< BasicBlock *, ColorVectorcolorEHFunclets (Function &F)
 If an EH funclet personality is in use (see isFuncletEHPersonality), this will recompute which blocks are in which funclet. More...
 
ModulePasscreateGlobalsAAWrapperPass ()
 
bool isGuard (const User *U)
 Returns true iff U has semantics of a guard expressed in a form of call of llvm.experimental.guard intrinsic. More...
 
bool isGuardAsWidenableBranch (const User *U)
 Returns true iff U has semantics of a guard expressed in a form of a widenable conditional branch to deopt block. More...
 
bool parseWidenableBranch (const User *U, Value *&Condition, Value *&WidenableCondition, BasicBlock *&IfTrueBB, BasicBlock *&IfFalseBB)
 If U is widenable branch looking like: cond = ... wc = call i1 @llvm.experimental.widenable.condition() branch_cond = and i1 cond, wc br i1 branch_cond, label if_true_bb, label if_false_bb ; <— U The function returns true, and the values cond and wc and blocks if_true_bb, if_false_bb are returned in the parameters (Condition, WidenableCondition, IfTrueBB and IfFalseFF) respectively. More...
 
std::vector< Instruction * > findIndirectCalls (Function &F)
 
InlineParams getInlineParams ()
 Generate the parameters to tune the inline cost analysis based only on the commandline options. More...
 
InlineParams getInlineParams (int Threshold)
 Generate the parameters to tune the inline cost analysis based on command line options. More...
 
InlineParams getInlineParams (unsigned OptLevel, unsigned SizeOptLevel)
 Generate the parameters to tune the inline cost analysis based on command line options. More...
 
int getCallsiteCost (CallBase &Call, const DataLayout &DL)
 Return the cost associated with a callsite, including parameter passing and the call/return instruction. More...
 
InlineCost getInlineCost (CallBase &Call, const InlineParams &Params, TargetTransformInfo &CalleeTTI, std::function< AssumptionCache &(Function &)> &GetAssumptionCache, Optional< function_ref< BlockFrequencyInfo &(Function &)> > GetBFI, ProfileSummaryInfo *PSI, OptimizationRemarkEmitter *ORE=nullptr)
 Get an InlineCost object representing the cost of inlining this callsite. More...
 
InlineCost getInlineCost (CallBase &Call, Function *Callee, const InlineParams &Params, TargetTransformInfo &CalleeTTI, std::function< AssumptionCache &(Function &)> &GetAssumptionCache, Optional< function_ref< BlockFrequencyInfo &(Function &)> > GetBFI, ProfileSummaryInfo *PSI, OptimizationRemarkEmitter *ORE)
 Get an InlineCost with the callee explicitly specified. More...
 
InlineResult isInlineViable (Function &Callee)
 Minimal filter to detect invalid constructs for inlining. More...
 
ValueSimplifyFNegInst (Value *Op, FastMathFlags FMF, const SimplifyQuery &Q)
 Given operand for an FNeg, fold the result or return null. More...
 
ValueSimplifyAddInst (Value *LHS, Value *RHS, bool isNSW, bool isNUW, const SimplifyQuery &Q)
 Given operands for an Add, fold the result or return null. More...
 
ValueSimplifySubInst (Value *LHS, Value *RHS, bool isNSW, bool isNUW, const SimplifyQuery &Q)
 Given operands for a Sub, fold the result or return null. More...
 
ValueSimplifyFAddInst (Value *LHS, Value *RHS, FastMathFlags FMF, const SimplifyQuery &Q)
 Given operands for an FAdd, fold the result or return null. More...
 
ValueSimplifyFSubInst (Value *LHS, Value *RHS, FastMathFlags FMF, const SimplifyQuery &Q)
 Given operands for an FSub, fold the result or return null. More...
 
ValueSimplifyFMulInst (Value *LHS, Value *RHS, FastMathFlags FMF, const SimplifyQuery &Q)
 Given operands for an FMul, fold the result or return null. More...
 
ValueSimplifyMulInst (Value *LHS, Value *RHS, const SimplifyQuery &Q)
 Given operands for a Mul, fold the result or return null. More...
 
ValueSimplifySDivInst (Value *LHS, Value *RHS, const SimplifyQuery &Q)
 Given operands for an SDiv, fold the result or return null. More...
 
ValueSimplifyUDivInst (Value *LHS, Value *RHS, const SimplifyQuery &Q)
 Given operands for a UDiv, fold the result or return null. More...
 
ValueSimplifyFDivInst (Value *LHS, Value *RHS, FastMathFlags FMF, const SimplifyQuery &Q)
 Given operands for an FDiv, fold the result or return null. More...
 
ValueSimplifySRemInst (Value *LHS, Value *RHS, const SimplifyQuery &Q)
 Given operands for an SRem, fold the result or return null. More...
 
ValueSimplifyURemInst (Value *LHS, Value *RHS, const SimplifyQuery &Q)
 Given operands for a URem, fold the result or return null. More...
 
ValueSimplifyFRemInst (Value *LHS, Value *RHS, FastMathFlags FMF, const SimplifyQuery &Q)
 Given operands for an FRem, fold the result or return null. More...
 
ValueSimplifyShlInst (Value *Op0, Value *Op1, bool isNSW, bool isNUW, const SimplifyQuery &Q)
 Given operands for a Shl, fold the result or return null. More...
 
ValueSimplifyLShrInst (Value *Op0, Value *Op1, bool isExact, const SimplifyQuery &Q)
 Given operands for a LShr, fold the result or return null. More...
 
ValueSimplifyAShrInst (Value *Op0, Value *Op1, bool isExact, const SimplifyQuery &Q)
 Given operands for a AShr, fold the result or return nulll. More...
 
ValueSimplifyAndInst (Value *LHS, Value *RHS, const SimplifyQuery &Q)
 Given operands for an And, fold the result or return null. More...
 
ValueSimplifyOrInst (Value *LHS, Value *RHS, const SimplifyQuery &Q)
 Given operands for an Or, fold the result or return null. More...
 
ValueSimplifyXorInst (Value *LHS, Value *RHS, const SimplifyQuery &Q)
 Given operands for an Xor, fold the result or return null. More...
 
ValueSimplifyICmpInst (unsigned Predicate, Value *LHS, Value *RHS, const SimplifyQuery &Q)
 Given operands for an ICmpInst, fold the result or return null. More...
 
ValueSimplifyFCmpInst (unsigned Predicate, Value *LHS, Value *RHS, FastMathFlags FMF, const SimplifyQuery &Q)
 Given operands for an FCmpInst, fold the result or return null. More...
 
ValueSimplifySelectInst (Value *Cond, Value *TrueVal, Value *FalseVal, const SimplifyQuery &Q)
 Given operands for a SelectInst, fold the result or return null. More...
 
ValueSimplifyGEPInst (Type *SrcTy, ArrayRef< Value * > Ops, const SimplifyQuery &Q)
 Given operands for a GetElementPtrInst, fold the result or return null. More...
 
ValueSimplifyInsertValueInst (Value *Agg, Value *Val, ArrayRef< unsigned > Idxs, const SimplifyQuery &Q)
 Given operands for an InsertValueInst, fold the result or return null. More...
 
ValueSimplifyInsertElementInst (Value *Vec, Value *Elt, Value *Idx, const SimplifyQuery &Q)
 Given operands for an InsertElement, fold the result or return null. More...
 
ValueSimplifyExtractValueInst (Value *Agg, ArrayRef< unsigned > Idxs, const SimplifyQuery &Q)
 Given operands for an ExtractValueInst, fold the result or return null. More...
 
ValueSimplifyExtractElementInst (Value *Vec, Value *Idx, const SimplifyQuery &Q)
 Given operands for an ExtractElementInst, fold the result or return null. More...
 
ValueSimplifyCastInst (unsigned CastOpc, Value *Op, Type *Ty, const SimplifyQuery &Q)
 Given operands for a CastInst, fold the result or return null. More...
 
ValueSimplifyShuffleVectorInst (Value *Op0, Value *Op1, Constant *Mask, Type *RetTy, const SimplifyQuery &Q)
 Given operands for a ShuffleVectorInst, fold the result or return null. More...
 
ValueSimplifyCmpInst (unsigned Predicate, Value *LHS, Value *RHS, const SimplifyQuery &Q)
 Given operands for a CmpInst, fold the result or return null. More...
 
ValueSimplifyUnOp (unsigned Opcode, Value *Op, const SimplifyQuery &Q)
 Given operand for a UnaryOperator, fold the result or return null. More...
 
ValueSimplifyFPUnOp (unsigned Opcode, Value *Op, FastMathFlags FMF, const SimplifyQuery &Q)
 Given operand for an FP UnaryOperator, fold the result or return null. More...
 
ValueSimplifyBinOp (unsigned Opcode, Value *LHS, Value *RHS, const SimplifyQuery &Q)
 Given operands for a BinaryOperator, fold the result or return null. More...
 
ValueSimplifyFPBinOp (unsigned Opcode, Value *LHS, Value *RHS, FastMathFlags FMF, const SimplifyQuery &Q)
 Given operands for an FP BinaryOperator, fold the result or return null. More...
 
ValueSimplifyCall (CallBase *Call, const SimplifyQuery &Q)
 Given a callsite, fold the result or return null. More...
 
ValueSimplifyInstruction (Instruction *I, const SimplifyQuery &Q, OptimizationRemarkEmitter *ORE=nullptr)
 See if we can compute a simplified version of this instruction. More...
 
bool replaceAndRecursivelySimplify (Instruction *I, Value *SimpleV, const TargetLibraryInfo *TLI=nullptr, const DominatorTree *DT=nullptr, AssumptionCache *AC=nullptr, SmallSetVector< Instruction *, 8 > *UnsimplifiedUsers=nullptr)
 Replace all uses of 'I' with 'SimpleV' and simplify the uses recursively. More...
 
bool recursivelySimplifyInstruction (Instruction *I, const TargetLibraryInfo *TLI=nullptr, const DominatorTree *DT=nullptr, AssumptionCache *AC=nullptr)
 Recursively attempt to simplify an instruction. More...
 
const SimplifyQuery getBestSimplifyQuery (Pass &, Function &)
 
template<class T , class... TArgs>
const SimplifyQuery getBestSimplifyQuery (AnalysisManager< T, TArgs... > &, Function &)
 
const SimplifyQuery getBestSimplifyQuery (LoopStandardAnalysisResults &, const DataLayout &)
 
Interval::succ_iterator succ_begin (Interval *I)
 succ_begin/succ_end - define methods so that Intervals may be used just like BasicBlocks can with the succ_* functions, and *succ_iterator. More...
 
Interval::succ_iterator succ_end (Interval *I)
 
Interval::pred_iterator pred_begin (Interval *I)
 pred_begin/pred_end - define methods so that Intervals may be used just like BasicBlocks can with the pred_* functions, and *pred_iterator. More...
 
Interval::pred_iterator pred_end (Interval *I)
 
BasicBlockgetNodeHeader (BasicBlock *BB)
 
BasicBlockgetNodeHeader (Interval *I)
 
BasicBlockgetSourceGraphNode (Function *, BasicBlock *BB)
 
IntervalgetSourceGraphNode (IntervalPartition *IP, BasicBlock *BB)
 
void addNodeToInterval (Interval *Int, BasicBlock *BB)
 
void addNodeToInterval (Interval *Int, Interval *I)
 
function_interval_iterator intervals_begin (Function *F, bool DeleteInts=true)
 
function_interval_iterator intervals_end (Function *)
 
interval_part_interval_iterator intervals_begin (IntervalPartition &IP, bool DeleteIntervals=true)
 
interval_part_interval_iterator intervals_end (IntervalPartition &IP)
 
PasscreateIVUsersPass ()
 
void initializeLazyBFIPassPass (PassRegistry &Registry)
 Helper for client passes to initialize dependent passes for LBFI. More...
 
void initializeLazyBPIPassPass (PassRegistry &Registry)
 Helper for client passes to initialize dependent passes for LBPI. More...
 
FunctionPass * createLintPass ()
 Create a lint pass. More...
 
void lintModule (const Module &M)
 Check a module. More...
 
void lintFunction (const Function &F)
 lintFunction - Check a function for errors, printing messages on stderr. More...
 
bool isDereferenceablePointer (const Value *V, Type *Ty, const DataLayout &DL, const Instruction *CtxI=nullptr, const DominatorTree *DT=nullptr)
 Return true if this is always a dereferenceable pointer. More...
 
bool isDereferenceableAndAlignedPointer (const Value *V, Type *Ty, unsigned Align, const DataLayout &DL, const Instruction *CtxI=nullptr, const DominatorTree *DT=nullptr)
 Returns true if V is always a dereferenceable pointer with alignment greater or equal than requested. More...
 
bool isDereferenceableAndAlignedPointer (const Value *V, unsigned Align, const APInt &Size, const DataLayout &DL, const Instruction *CtxI=nullptr, const DominatorTree *DT=nullptr)
 Returns true if V is always dereferenceable for Size byte with alignment greater or equal than requested. More...
 
bool isSafeToLoadUnconditionally (Value *V, unsigned Align, APInt &Size, const DataLayout &DL, Instruction *ScanFrom=nullptr, const DominatorTree *DT=nullptr)
 Return true if we know that executing a load from this value cannot trap. More...
 
bool isSafeToLoadUnconditionally (Value *V, Type *Ty, unsigned Align, const DataLayout &DL, Instruction *ScanFrom=nullptr, const DominatorTree *DT=nullptr)
 Return true if we know that executing a load from this value cannot trap. More...
 
ValueFindAvailableLoadedValue (LoadInst *Load, BasicBlock *ScanBB, BasicBlock::iterator &ScanFrom, unsigned MaxInstsToScan=DefMaxInstsToScan, AliasAnalysis *AA=nullptr, bool *IsLoadCSE=nullptr, unsigned *NumScanedInst=nullptr)
 Scan backwards to see if we have the value of the given load available locally within a small number of instructions. More...
 
ValueFindAvailablePtrLoadStore (Value *Ptr, Type *AccessTy, bool AtLeastAtomic, BasicBlock *ScanBB, BasicBlock::iterator &ScanFrom, unsigned MaxInstsToScan, AliasAnalysis *AA, bool *IsLoad, unsigned *NumScanedInst)
 Scan backwards to see if we have the value of the given pointer available locally within a small number of instructions. More...
 
ValuestripIntegerCast (Value *V)
 
const SCEVreplaceSymbolicStrideSCEV (PredicatedScalarEvolution &PSE, const ValueToValueMap &PtrToStride, Value *Ptr, Value *OrigPtr=nullptr)
 Return the SCEV corresponding to a pointer with the symbolic stride replaced with constant one, assuming the SCEV predicate associated with PSE is true. More...
 
int64_t getPtrStride (PredicatedScalarEvolution &PSE, Value *Ptr, const Loop *Lp, const ValueToValueMap &StridesMap=ValueToValueMap(), bool Assume=false, bool ShouldCheckWrap=true)
 If the pointer has a constant stride return it in units of its element size. More...
 
bool sortPtrAccesses (ArrayRef< Value * > VL, const DataLayout &DL, ScalarEvolution &SE, SmallVectorImpl< unsigned > &SortedIndices)
 Attempt to sort the pointers in VL and return the sorted indices in SortedIndices, if reordering is required. More...
 
bool isConsecutiveAccess (Value *A, Value *B, const DataLayout &DL, ScalarEvolution &SE, bool CheckType=true)
 Returns true if the memory operations A and B are consecutive. More...
 
PreservedAnalyses getLoopPassPreservedAnalyses ()
 Returns the minimum set of Analyses that all loop passes must preserve. More...
 
template<class BlockT , class LoopT >
raw_ostreamoperator<< (raw_ostream &OS, const LoopBase< BlockT, LoopT > &Loop)
 
void printLoop (Loop &L, raw_ostream &OS, const std::string &Banner="")
 Function to print a loop's contents as LLVM's text IR assembly. More...
 
MDNodefindOptionMDForLoopID (MDNode *LoopID, StringRef Name)
 Find and return the loop attribute node for the attribute Name in LoopID. More...
 
MDNodefindOptionMDForLoop (const Loop *TheLoop, StringRef Name)
 Find string metadata for a loop. More...
 
bool isValidAsAccessGroup (MDNode *AccGroup)
 Return whether an MDNode might represent an access group. More...
 
llvm::MDNodemakePostTransformationMetadata (llvm::LLVMContext &Context, MDNode *OrigLoopID, llvm::ArrayRef< llvm::StringRef > RemovePrefixes, llvm::ArrayRef< llvm::MDNode * > AddAttrs)
 Create a new LoopID after the loop has been transformed. More...
 
template<class BlockT , class LoopT , typename PredicateT >
void getUniqueExitBlocksHelper (const LoopT *L, SmallVectorImpl< BlockT * > &ExitBlocks, PredicateT Pred)
 
template<class BlockT , class LoopT >
static void discoverAndMapSubloop (LoopT *L, ArrayRef< BlockT * > Backedges, LoopInfoBase< BlockT, LoopT > *LI, const DomTreeBase< BlockT > &DomTree)
 Stable LoopInfo Analysis - Build a loop tree using stable iterators so the result does / not depend on use list (block predecessor) order. More...
 
template<typename T >
bool compareVectors (std::vector< T > &BB1, std::vector< T > &BB2)
 
template<class BlockT , class LoopT >
void addInnerLoopsToHeadersMap (DenseMap< BlockT *, const LoopT * > &LoopHeaders, const LoopInfoBase< BlockT, LoopT > &LI, const LoopT &L)
 
template<class BlockT , class LoopT >
static void compareLoops (const LoopT *L, const LoopT *OtherL, DenseMap< BlockT *, const LoopT * > &OtherLoopHeaders)
 
bool isAllocationFn (const Value *V, const TargetLibraryInfo *TLI, bool LookThroughBitCast=false)
 Tests if a value is a call or invoke to a library function that allocates or reallocates memory (either malloc, calloc, realloc, or strdup like). More...
 
bool isNoAliasFn (const Value *V, const TargetLibraryInfo *TLI, bool LookThroughBitCast=false)
 Tests if a value is a call or invoke to a function that returns a NoAlias pointer (including malloc/calloc/realloc/strdup-like functions). More...
 
bool isMallocLikeFn (const Value *V, const TargetLibraryInfo *TLI, bool LookThroughBitCast=false)
 Tests if a value is a call or invoke to a library function that allocates uninitialized memory (such as malloc). More...
 
bool isCallocLikeFn (const Value *V, const TargetLibraryInfo *TLI, bool LookThroughBitCast=false)
 Tests if a value is a call or invoke to a library function that allocates zero-filled memory (such as calloc). More...
 
bool isMallocOrCallocLikeFn (const Value *V, const TargetLibraryInfo *TLI, bool LookThroughBitCast=false)
 Tests if a value is a call or invoke to a library function that allocates memory similar to malloc or calloc. More...
 
bool isAllocLikeFn (const Value *V, const TargetLibraryInfo *TLI, bool LookThroughBitCast=false)
 Tests if a value is a call or invoke to a library function that allocates memory (either malloc, calloc, or strdup like). More...
 
bool isReallocLikeFn (const Value *V, const TargetLibraryInfo *TLI, bool LookThroughBitCast=false)
 Tests if a value is a call or invoke to a library function that reallocates memory (e.g., realloc). More...
 
bool isReallocLikeFn (const Function *F, const TargetLibraryInfo *TLI)
 Tests if a function is a call or invoke to a library function that reallocates memory (e.g., realloc). More...
 
const CallInstextractMallocCall (const Value *I, const TargetLibraryInfo *TLI)
 extractMallocCall - Returns the corresponding CallInst if the instruction is a malloc call. More...
 
CallInstextractMallocCall (Value *I, const TargetLibraryInfo *TLI)
 
PointerTypegetMallocType (const CallInst *CI, const TargetLibraryInfo *TLI)
 getMallocType - Returns the PointerType resulting from the malloc call. More...
 
TypegetMallocAllocatedType (const CallInst *CI, const TargetLibraryInfo *TLI)
 getMallocAllocatedType - Returns the Type allocated by malloc call. More...
 
ValuegetMallocArraySize (CallInst *CI, const DataLayout &DL, const TargetLibraryInfo *TLI, bool LookThroughSExt=false)
 getMallocArraySize - Returns the array size of a malloc call. More...
 
const CallInstextractCallocCall (const Value *I, const TargetLibraryInfo *TLI)
 extractCallocCall - Returns the corresponding CallInst if the instruction is a calloc call. More...
 
CallInstextractCallocCall (Value *I, const TargetLibraryInfo *TLI)
 
bool isLibFreeFunction (const Function *F, const LibFunc TLIFn)
 isLibFreeFunction - Returns true if the function is a builtin free() More...
 
const CallInstisFreeCall (const Value *I, const TargetLibraryInfo *TLI)
 isFreeCall - Returns non-null if the value is a call to the builtin free() More...
 
CallInstisFreeCall (Value *I, const TargetLibraryInfo *TLI)
 
bool getObjectSize (const Value *Ptr, uint64_t &Size, const DataLayout &DL, const TargetLibraryInfo *TLI, ObjectSizeOpts Opts={})
 Compute the size of the object pointed by Ptr. More...
 
ValuelowerObjectSizeCall (IntrinsicInst *ObjectSize, const DataLayout &DL, const TargetLibraryInfo *TLI, bool MustSucceed)
 Try to turn a call to @llvm.objectsize into an integer value of the given Type. More...
 
raw_ostreamoperator<< (raw_ostream &OS, LocationSize Size)
 
raw_ostreamoperator<< (raw_ostream &OS, const MemoryAccess &MA)
 
upward_defs_iterator upward_defs_begin (const MemoryAccessPair &Pair)
 
upward_defs_iterator upward_defs_end ()
 
iterator_range< upward_defs_iteratorupward_defs (const MemoryAccessPair &Pair)
 
template<class T >
iterator_range< def_chain_iterator< T > > def_chain (T MA, MemoryAccess *UpTo=nullptr)
 
template<class T >
iterator_range< def_chain_iterator< T, true > > optimized_def_chain (T MA)
 
ModuleSummaryIndex buildModuleSummaryIndex (const Module &M, std::function< BlockFrequencyInfo *(const Function &F)> GetBFICallback, ProfileSummaryInfo *PSI)
 Direct function to compute a ModuleSummaryIndex from a given module. More...
 
ModulePasscreateModuleSummaryIndexWrapperPass ()
 
ImmutablePasscreateObjCARCAAWrapperPass ()
 
FunctionPass * createPAEvalPass ()
 
FunctionPass * createLazyValueInfoPass ()
 createLazyValueInfoPass - This creates an instance of the LazyValueInfo pass. More...
 
FunctionPass * createCostModelAnalysisPass ()
 
FunctionPass * createDelinearizationPass ()
 
FunctionPass * createLegacyDivergenceAnalysisPass ()
 
FunctionPass * createInstCountPass ()
 
FunctionPass * createRegionInfoPass ()
 
ModulePasscreateModuleDebugInfoPrinterPass ()
 
FunctionPass * createMemDepPrinter ()
 
FunctionPass * createMemDerefPrinter ()
 
FunctionPass * createMustExecutePrinter ()
 
FunctionPass * createPostDomTree ()
 
template<class Tr >
raw_ostreamoperator<< (raw_ostream &OS, const RegionNodeBase< Tr > &Node)
 Print a RegionNode. More...
 
template<class NodeRef , class BlockT , class RegionT >
RNSuccIterator< NodeRef, BlockT, RegionT > succ_begin (NodeRef Node)
 
template<class NodeRef , class BlockT , class RegionT >
RNSuccIterator< NodeRef, BlockT, RegionT > succ_end (NodeRef Node)
 
 RegionNodeGraphTraits (RegionNode, BasicBlock, Region)
 
 RegionGraphTraits (Region, RegionNode)
 
FunctionPass * createRegionViewerPass ()
 
FunctionPass * createRegionOnlyViewerPass ()
 
FunctionPass * createRegionPrinterPass ()
 
FunctionPass * createRegionOnlyPrinterPass ()
 
void viewRegion (llvm::RegionInfo *RI)
 Open a viewer to display the GraphViz vizualization of the analysis result. More...
 
void viewRegion (const llvm::Function *F)
 Analyze the regions of a function and open its GraphViz visualization in a viewer. More...
 
void viewRegionOnly (llvm::RegionInfo *RI)
 Open a viewer to display the GraphViz vizualization of the analysis result. More...
 
void viewRegionOnly (const llvm::Function *F)
 Analyze the regions of a function and open its GraphViz visualization in a viewer. More...
 
raw_ostreamoperator<< (raw_ostream &OS, const SCEV &S)
 
raw_ostreamoperator<< (raw_ostream &OS, const SCEVPredicate &P)
 
FunctionPass * createSCEVAAWrapperPass ()
 Creates an instance of SCEVAAWrapperPass. More...
 
bool isSafeToExpand (const SCEV *S, ScalarEvolution &SE)
 Return true if the given expression is safe to expand in the sense that all materialized values are safe to speculate anywhere their operands are defined. More...
 
bool isSafeToExpandAt (const SCEV *S, const Instruction *InsertionPoint, ScalarEvolution &SE)
 Return true if the given expression is safe to expand in the sense that all materialized values are defined and safe to speculate at the specified location and their operands are defined at this location. More...
 
static unsigned short computeExpressionSize (ArrayRef< const SCEV * > Args)
 
template<typename SV >
void visitAll (const SCEV *Root, SV &Visitor)
 Use SCEVTraversal to visit all nodes in the given expression tree. More...
 
template<typename PredTy >
bool SCEVExprContains (const SCEV *Root, PredTy Pred)
 Return true if any node in Root satisfies the predicate Pred. More...
 
const SCEVnormalizeForPostIncUse (const SCEV *S, const PostIncLoopSet &Loops, ScalarEvolution &SE)
 Normalize S to be post-increment for all loops present in Loops. More...
 
const SCEVnormalizeForPostIncUseIf (const SCEV *S, NormalizePredTy Pred, ScalarEvolution &SE)
 Normalize S for all add recurrence sub-expressions for which Pred returns true. More...
 
const SCEVdenormalizeForPostIncUse (const SCEV *S, const PostIncLoopSet &Loops, ScalarEvolution &SE)
 Denormalize S to be post-increment for all loops present in Loops. More...
 
ImmutablePasscreateScopedNoAliasAAWrapperPass ()
 
ImmutablePasscreateTargetTransformInfoWrapperPass (TargetIRAnalysis TIRA)
 Create an analysis pass wrapper around a TTI object. More...
 
ImmutablePasscreateTypeBasedAAWrapperPass ()
 
void findDevirtualizableCallsForTypeTest (SmallVectorImpl< DevirtCallSite > &DevirtCalls, SmallVectorImpl< CallInst * > &Assumes, const CallInst *CI, DominatorTree &DT)
 Given a call to the intrinsic @llvm.type.test, find all devirtualizable call sites based on the call and return them in DevirtCalls. More...
 
void findDevirtualizableCallsForTypeCheckedLoad (SmallVectorImpl< DevirtCallSite > &DevirtCalls, SmallVectorImpl< Instruction * > &LoadedPtrs, SmallVectorImpl< Instruction * > &Preds, bool &HasNonCallUses, const CallInst *CI, DominatorTree &DT)
 Given a call to the intrinsic @llvm.type.checked.load, find all devirtualizable call sites based on the call and return them in DevirtCalls. More...
 
template<typename IRBuilderTy >
ValueEmitGEPOffset (IRBuilderTy *Builder, const DataLayout &DL, User *GEP, bool NoAssumptions=false)
 Given a getelementptr instruction/constantexpr, emit the code necessary to compute the offset from the base pointer (without adding in the base pointer). More...
 
raw_ostreamoperator<< (raw_ostream &OS, const ValueLatticeElement &Val)
 
bool canTrackArgumentsInterprocedurally (Function *F)
 Determine if the values of the given function's arguments can be tracked interprocedurally. More...
 
bool canTrackReturnsInterprocedurally (Function *F)
 Determine if the values of the given function's returns can be tracked interprocedurally. More...
 
bool canTrackGlobalVariableInterprocedurally (GlobalVariable *GV)
 Determine if the value maintained in the given global variable can be tracked interprocedurally. More...
 
void computeKnownBits (const Value *V, KnownBits &Known, const DataLayout &DL, unsigned Depth=0, AssumptionCache *AC=nullptr, const Instruction *CxtI=nullptr, const DominatorTree *DT=nullptr, OptimizationRemarkEmitter *ORE=nullptr, bool UseInstrInfo=true)
 Determine which bits of V are known to be either zero or one and return them in the KnownZero/KnownOne bit sets. More...
 
KnownBits computeKnownBits (const Value *V, const DataLayout &DL, unsigned Depth=0, AssumptionCache *AC=nullptr, const Instruction *CxtI=nullptr, const DominatorTree *DT=nullptr, OptimizationRemarkEmitter *ORE=nullptr, bool UseInstrInfo=true)
 Returns the known bits rather than passing by reference. More...
 
void computeKnownBitsFromRangeMetadata (const MDNode &Ranges, KnownBits &Known)
 Compute known bits from the range metadata. More...
 
bool haveNoCommonBitsSet (const Value *LHS, const Value *RHS, const DataLayout &DL, AssumptionCache *AC=nullptr, const Instruction *CxtI=nullptr, const DominatorTree *DT=nullptr, bool UseInstrInfo=true)
 Return true if LHS and RHS have no common bits set. More...
 
bool isKnownToBeAPowerOfTwo (const Value *V, const DataLayout &DL, bool OrZero=false, unsigned Depth=0, AssumptionCache *AC=nullptr, const Instruction *CxtI=nullptr, const DominatorTree *DT=nullptr, bool UseInstrInfo=true)
 Return true if the given value is known to have exactly one bit set when defined. More...
 
bool isOnlyUsedInZeroEqualityComparison (const Instruction *CxtI)
 
bool isKnownNonZero (const Value *V, const DataLayout &DL, unsigned Depth=0, AssumptionCache *AC=nullptr, const Instruction *CxtI=nullptr, const DominatorTree *DT=nullptr, bool UseInstrInfo=true)
 Return true if the given value is known to be non-zero when defined. More...
 
bool isKnownNegation (const Value *X, const Value *Y, bool NeedNSW=false)
 Return true if the two given values are negation. More...
 
bool isKnownNonNegative (const Value *V, const DataLayout &DL, unsigned Depth=0, AssumptionCache *AC=nullptr, const Instruction *CxtI=nullptr, const DominatorTree *DT=nullptr, bool UseInstrInfo=true)
 Returns true if the give value is known to be non-negative. More...
 
bool isKnownPositive (const Value *V, const DataLayout &DL, unsigned Depth=0, AssumptionCache *AC=nullptr, const Instruction *CxtI=nullptr, const DominatorTree *DT=nullptr, bool UseInstrInfo=true)
 Returns true if the given value is known be positive (i.e. More...
 
bool isKnownNegative (const Value *V, const DataLayout &DL, unsigned Depth=0, AssumptionCache *AC=nullptr, const Instruction *CxtI=nullptr, const DominatorTree *DT=nullptr, bool UseInstrInfo=true)
 Returns true if the given value is known be negative (i.e. More...
 
bool isKnownNonEqual (const Value *V1, const Value *V2, const DataLayout &DL, AssumptionCache *AC=nullptr, const Instruction *CxtI=nullptr, const DominatorTree *DT=nullptr, bool UseInstrInfo=true)
 Return true if the given values are known to be non-equal when defined. More...
 
bool MaskedValueIsZero (const Value *V, const APInt &Mask, const DataLayout &DL, unsigned Depth=0, AssumptionCache *AC=nullptr, const Instruction *CxtI=nullptr, const DominatorTree *DT=nullptr, bool UseInstrInfo=true)
 Return true if 'V & Mask' is known to be zero. More...
 
unsigned ComputeNumSignBits (const Value *Op, const DataLayout &DL, unsigned Depth=0, AssumptionCache *AC=nullptr, const Instruction *CxtI=nullptr, const DominatorTree *DT=nullptr, bool UseInstrInfo=true)
 Return the number of times the sign bit of the register is replicated into the other bits. More...
 
bool ComputeMultiple (Value *V, unsigned Base, Value *&Multiple, bool LookThroughSExt=false, unsigned Depth=0)
 This function computes the integer multiple of Base that equals V. More...
 
Intrinsic::ID getIntrinsicForCallSite (ImmutableCallSite ICS, const TargetLibraryInfo *TLI)
 Map a call instruction to an intrinsic ID. More...
 
bool CannotBeNegativeZero (const Value *V, const TargetLibraryInfo *TLI, unsigned Depth=0)
 Return true if we can prove that the specified FP value is never equal to -0.0. More...
 
bool CannotBeOrderedLessThanZero (const Value *V, const TargetLibraryInfo *TLI)
 Return true if we can prove that the specified FP value is either NaN or never less than -0.0. More...
 
bool isKnownNeverNaN (const Value *V, const TargetLibraryInfo *TLI, unsigned Depth=0)
 Return true if the floating-point scalar value is not a NaN or if the floating-point vector value has no NaN elements. More...
 
bool SignBitMustBeZero (const Value *V, const TargetLibraryInfo *TLI)
 Return true if we can prove that the specified FP value's sign bit is 0. More...
 
ValueisBytewiseValue (Value *V, const DataLayout &DL)
 If the specified value can be set by repeating the same byte in memory, return the i8 value that it is represented with. More...
 
ValueFindInsertedValue (Value *V, ArrayRef< unsigned > idx_range, Instruction *InsertBefore=nullptr)
 Given an aggregrate and an sequence of indices, see if the scalar value indexed is already around as a register, for example if it were inserted directly into the aggregrate. More...
 
ValueGetPointerBaseWithConstantOffset (Value *Ptr, int64_t &Offset, const DataLayout &DL)
 Analyze the specified pointer to see if it can be expressed as a base pointer plus a constant offset. More...
 
const ValueGetPointerBaseWithConstantOffset (const Value *Ptr, int64_t &Offset, const DataLayout &DL)
 
bool isGEPBasedOnPointerToString (const GEPOperator *GEP, unsigned CharSize=8)
 Returns true if the GEP is based on a pointer to a string (array of. More...
 
bool getConstantDataArrayInfo (const Value *V, ConstantDataArraySlice &Slice, unsigned ElementSize, uint64_t Offset=0)
 Returns true if the value V is a pointer into a ConstantDataArray. More...
 
bool getConstantStringInfo (const Value *V, StringRef &Str, uint64_t Offset=0, bool TrimAtNul=true)
 This function computes the length of a null-terminated C string pointed to by V. More...
 
uint64_t GetStringLength (const Value *V, unsigned CharSize=8)
 If we can compute the length of the string pointed to by the specified pointer, return 'len+1'. More...
 
const ValuegetArgumentAliasingToReturnedPointer (const CallBase *Call)
 This function returns call pointer argument that is considered the same by aliasing rules. More...
 
ValuegetArgumentAliasingToReturnedPointer (CallBase *Call)
 
bool isIntrinsicReturningPointerAliasingArgumentWithoutCapturing (const CallBase *Call)
 
ValueGetUnderlyingObject (Value *V, const DataLayout &DL, unsigned MaxLookup=6)
 This method strips off any GEP address adjustments and pointer casts from the specified value, returning the original object being addressed. More...
 
const ValueGetUnderlyingObject (const Value *V, const DataLayout &DL, unsigned MaxLookup=6)
 
void GetUnderlyingObjects (const Value *V, SmallVectorImpl< const Value * > &Objects, const DataLayout &DL, LoopInfo *LI=nullptr, unsigned MaxLookup=6)
 This method is similar to GetUnderlyingObject except that it can look through phi and select instructions and return multiple objects. More...
 
bool getUnderlyingObjectsForCodeGen (const Value *V, SmallVectorImpl< Value * > &Objects, const DataLayout &DL)
 This is a wrapper around GetUnderlyingObjects and adds support for basic ptrtoint+arithmetic+inttoptr sequences. More...
 
bool onlyUsedByLifetimeMarkers (const Value *V)
 Return true if the only users of this pointer are lifetime markers. More...
 
bool isSafeToSpeculativelyExecute (const Value *V, const Instruction *CtxI=nullptr, const DominatorTree *DT=nullptr)
 Return true if the instruction does not have any effects besides calculating the result and does not have undefined behavior. More...
 
bool mayBeMemoryDependent (const Instruction &I)
 Returns true if the result or effects of the given instructions I depend on or influence global memory. More...
 
bool isAssumeLikeIntrinsic (const Instruction *I)
 Return true if it is an intrinsic that cannot be speculated but also cannot trap. More...
 
bool isValidAssumeForContext (const Instruction *I, const Instruction *CxtI, const DominatorTree *DT=nullptr)
 Return true if it is valid to use the assumptions provided by an assume intrinsic, I, at the point in the control-flow identified by the context instruction, CxtI. More...
 
OverflowResult computeOverflowForUnsignedMul (const Value *LHS, const Value *RHS, const DataLayout &DL, AssumptionCache *AC, const Instruction *CxtI, const DominatorTree *DT, bool UseInstrInfo=true)
 
OverflowResult computeOverflowForSignedMul (const Value *LHS, const Value *RHS, const DataLayout &DL, AssumptionCache *AC, const Instruction *CxtI, const DominatorTree *DT, bool UseInstrInfo=true)
 
OverflowResult computeOverflowForUnsignedAdd (const Value *LHS, const Value *RHS, const DataLayout &DL, AssumptionCache *AC, const Instruction *CxtI, const DominatorTree *DT, bool UseInstrInfo=true)
 
OverflowResult computeOverflowForSignedAdd (const Value *LHS, const Value *RHS, const DataLayout &DL, AssumptionCache *AC=nullptr, const Instruction *CxtI=nullptr, const DominatorTree *DT=nullptr)
 
OverflowResult computeOverflowForSignedAdd (const AddOperator *Add, const DataLayout &DL, AssumptionCache *AC=nullptr, const Instruction *CxtI=nullptr, const DominatorTree *DT=nullptr)
 This version also leverages the sign bit of Add if known. More...
 
OverflowResult computeOverflowForUnsignedSub (const Value *LHS, const Value *RHS, const DataLayout &DL, AssumptionCache *AC, const Instruction *CxtI, const DominatorTree *DT)
 
OverflowResult computeOverflowForSignedSub (const Value *LHS, const Value *RHS, const DataLayout &DL, AssumptionCache *AC, const Instruction *CxtI, const DominatorTree *DT)
 
bool isOverflowIntrinsicNoWrap (const WithOverflowInst *WO, const DominatorTree &DT)
 Returns true if the arithmetic part of the WO 's result is used only along the paths control dependent on the computation not overflowing, WO being an <op>.with.overflow intrinsic. More...
 
ConstantRange computeConstantRange (const Value *V, bool UseInstrInfo=true)
 Determine the possible constant range of an integer or vector of integer value. More...
 
bool isGuaranteedToTransferExecutionToSuccessor (const Instruction *I)
 Return true if this function can prove that the instruction I will always transfer execution to one of its successors (including the next instruction that follows within a basic block). More...
 
bool isGuaranteedToTransferExecutionToSuccessor (const BasicBlock *BB)
 Returns true if this block does not contain a potential implicit exit. More...
 
bool isGuaranteedToExecuteForEveryIteration (const Instruction *I, const Loop *L)
 Return true if this function can prove that the instruction I is executed for every iteration of the loop L. More...
 
bool propagatesFullPoison (const Instruction *I)
 Return true if this function can prove that I is guaranteed to yield full-poison (all bits poison) if at least one of its operands are full-poison (all bits poison). More...
 
const ValuegetGuaranteedNonFullPoisonOp (const Instruction *I)
 Return either nullptr or an operand of I such that I will trigger undefined behavior if I is executed and that operand has a full-poison value (all bits poison). More...
 
bool mustTriggerUB (const Instruction *I, const SmallSet< const Value *, 16 > &KnownPoison)
 Return true if the given instruction must trigger undefined behavior. More...
 
bool programUndefinedIfFullPoison (const Instruction *PoisonI)
 Return true if this function can prove that if PoisonI is executed and yields a full-poison value (all bits poison), then that will trigger undefined behavior. More...
 
SelectPatternResult matchSelectPattern (Value *V, Value *&LHS, Value *&RHS, Instruction::CastOps *CastOp=nullptr, unsigned Depth=0)
 Pattern match integer [SU]MIN, [SU]MAX and ABS idioms, returning the kind and providing the out parameter results if we successfully match. More...
 
SelectPatternResult matchSelectPattern (const Value *V, const Value *&LHS, const Value *&RHS, Instruction::CastOps *CastOp=nullptr)
 
SelectPatternResult matchDecomposedSelectPattern (CmpInst *CmpI, Value *TrueVal, Value *FalseVal, Value *&LHS, Value *&RHS, Instruction::CastOps *CastOp=nullptr, unsigned Depth=0)
 Determine the pattern that a select with the given compare as its predicate and given values as its true/false operands would match. More...
 
CmpInst::Predicate getMinMaxPred (SelectPatternFlavor SPF, bool Ordered=false)
 Return the canonical comparison predicate for the specified minimum/maximum flavor. More...
 
SelectPatternFlavor getInverseMinMaxFlavor (SelectPatternFlavor SPF)
 Return the inverse minimum/maximum flavor of the specified flavor. More...
 
CmpInst::Predicate getInverseMinMaxPred (SelectPatternFlavor SPF)
 Return the canonical inverse comparison predicate for the specified minimum/maximum flavor. More...
 
Optional< boolisImpliedCondition (const Value *LHS, const Value *RHS, const DataLayout &DL, bool LHSIsTrue=true, unsigned Depth=0)
 Return true if RHS is known to be implied true by LHS. More...
 
Optional< boolisImpliedByDomCondition (const Value *Cond, const Instruction *ContextI, const DataLayout &DL)
 Return the boolean condition value in the context of the given instruction if it is known based on dominating conditions. More...
 
bool isTriviallyVectorizable (Intrinsic::ID ID)
 Identify if the intrinsic is trivially vectorizable. More...
 
bool hasVectorInstrinsicScalarOpd (Intrinsic::ID ID, unsigned ScalarOpdIdx)
 Identifies if the vector form of the intrinsic has a scalar operand. More...
 
Intrinsic::ID getVectorIntrinsicIDForCall (const CallInst *CI, const TargetLibraryInfo *TLI)
 Returns intrinsic ID for call. More...
 
unsigned getGEPInductionOperand (const GetElementPtrInst *Gep)
 Find the operand of the GEP that should be checked for consecutive stores. More...
 
ValuestripGetElementPtr (Value *Ptr, ScalarEvolution *SE, Loop *Lp)
 If the argument is a GEP, then returns the operand identified by getGEPInductionOperand. More...
 
ValuegetUniqueCastUse (Value *Ptr, Loop *Lp, Type *Ty)
 If a value has only one user that is a CastInst, return it. More...
 
ValuegetStrideFromPointer (Value *Ptr, ScalarEvolution *SE, Loop *Lp)
 Get the stride of a pointer access in a loop. More...
 
ValuefindScalarElement (Value *V, unsigned EltNo)
 Given a vector and an element number, see if the scalar value is already around as a register, for example if it were inserted then extracted from the vector. More...
 
const ValuegetSplatValue (const Value *V)
 Get splat value if the input is a splat vector or return nullptr. More...
 
bool isSplatValue (const Value *V, unsigned Depth=0)
 Return true if the input value is known to be a vector with all identical elements (potentially including undefined elements). More...
 
MapVector< Instruction *, uint64_t > computeMinimumValueSizes (ArrayRef< BasicBlock * > Blocks, DemandedBits &DB, const TargetTransformInfo *TTI=nullptr)
 Compute a map of integer instructions to their minimum legal type size. More...
 
MDNodeuniteAccessGroups (MDNode *AccGroups1, MDNode *AccGroups2)
 Compute the union of two access-group lists. More...
 
MDNodeintersectAccessGroups (const Instruction *Inst1, const Instruction *Inst2)
 Compute the access-group list of access groups that Inst1 and Inst2 are both in. More...
 
InstructionpropagateMetadata (Instruction *I, ArrayRef< Value * > VL)
 Specifically, let Kinds = [MD_tbaa, MD_alias_scope, MD_noalias, MD_fpmath, MD_nontemporal, MD_access_group]. More...
 
ConstantcreateBitMaskForGaps (IRBuilder<> &Builder, unsigned VF, const InterleaveGroup< Instruction > &Group)
 Create a mask that filters the members of an interleave group where there are gaps. More...
 
ConstantcreateReplicatedMask (IRBuilder<> &Builder, unsigned ReplicationFactor, unsigned VF)
 Create a mask with replicated elements. More...
 
ConstantcreateInterleaveMask (IRBuilder<> &Builder, unsigned VF, unsigned NumVecs)
 Create an interleave shuffle mask. More...
 
ConstantcreateStrideMask (IRBuilder<> &Builder, unsigned Start, unsigned Stride, unsigned VF)
 Create a stride shuffle mask. More...
 
ConstantcreateSequentialMask (IRBuilder<> &Builder, unsigned Start, unsigned NumInts, unsigned NumUndefs)
 Create a sequential shuffle mask. More...
 
ValueconcatenateVectors (IRBuilder<> &Builder, ArrayRef< Value * > Vecs)
 Concatenate a list of vectors. More...
 
bool maskIsAllZeroOrUndef (Value *Mask)
 Given a mask vector of the form <Y x i1>, Return true if all of the elements of this predicate mask are false or undef. More...
 
bool maskIsAllOneOrUndef (Value *Mask)
 Given a mask vector of the form <Y x i1>, Return true if all of the elements of this predicate mask are true or undef. More...
 
APInt possiblyDemandedEltsInMask (Value *Mask)
 Given a mask vector of the form <Y x i1>, return an APInt (of bitwidth Y) for each lane which may be active. More...
 
std::unique_ptr< ModuleparseAssemblyFile (StringRef Filename, SMDiagnostic &Err, LLVMContext &Context, SlotMapping *Slots=nullptr, bool UpgradeDebugInfo=true, StringRef DataLayoutString="")
 This function is a main interface to the LLVM Assembly Parser. More...
 
std::unique_ptr< ModuleparseAssemblyString (StringRef AsmString, SMDiagnostic &Err, LLVMContext &Context, SlotMapping *Slots=nullptr, bool UpgradeDebugInfo=true, StringRef DataLayoutString="")
 The function is a secondary interface to the LLVM Assembly Parser. More...
 
ParsedModuleAndIndex parseAssemblyFileWithIndex (StringRef Filename, SMDiagnostic &Err, LLVMContext &Context, SlotMapping *Slots=nullptr, bool UpgradeDebugInfo=true, StringRef DataLayoutString="")
 This function is a main interface to the LLVM Assembly Parser. More...
 
std::unique_ptr< ModuleSummaryIndexparseSummaryIndexAssemblyFile (StringRef Filename, SMDiagnostic &Err)
 This function is a main interface to the LLVM Assembly Parser. More...
 
std::unique_ptr< ModuleparseAssembly (MemoryBufferRef F, SMDiagnostic &Err, LLVMContext &Context, SlotMapping *Slots=nullptr, bool UpgradeDebugInfo=true, StringRef DataLayoutString="")
 parseAssemblyFile and parseAssemblyString are wrappers around this function. More...
 
ParsedModuleAndIndex parseAssemblyWithIndex (MemoryBufferRef F, SMDiagnostic &Err, LLVMContext &Context, SlotMapping *Slots=nullptr, bool UpgradeDebugInfo=true, StringRef DataLayoutString="")
 Parse LLVM Assembly including the summary index from a MemoryBuffer. More...
 
std::unique_ptr< ModuleSummaryIndexparseSummaryIndexAssembly (MemoryBufferRef F, SMDiagnostic &Err)
 Parse LLVM Assembly for summary index from a MemoryBuffer. More...
 
bool parseAssemblyInto (MemoryBufferRef F, Module *M, ModuleSummaryIndex *Index, SMDiagnostic &Err, SlotMapping *Slots=nullptr, bool UpgradeDebugInfo=true, StringRef DataLayoutString="")
 This function is the low-level interface to the LLVM Assembly Parser. More...
 
ConstantparseConstantValue (StringRef Asm, SMDiagnostic &Err, const Module &M, const SlotMapping *Slots=nullptr)
 Parse a type and a constant value in the given string. More...
 
TypeparseType (StringRef Asm, SMDiagnostic &Err, const Module &M, const SlotMapping *Slots=nullptr)
 Parse a type in the given string. More...
 
TypeparseTypeAtBeginning (StringRef Asm, unsigned &Read, SMDiagnostic &Err, const Module &M, const SlotMapping *Slots=nullptr)
 Parse a string Asm that starts with a type. More...
 
static bool operator< (const DWARFAddressRange &LHS, const DWARFAddressRange &RHS)
 
raw_ostreamoperator<< (raw_ostream &OS, const DWARFAddressRange &R)
 
bool operator== (const DWARFDie::attribute_iterator &LHS, const DWARFDie::attribute_iterator &RHS)
 
bool operator!= (const DWARFDie::attribute_iterator &LHS, const DWARFDie::attribute_iterator &RHS)
 
bool operator== (const DWARFDie &LHS, const DWARFDie &RHS)
 
bool operator!= (const DWARFDie &LHS, const DWARFDie &RHS)
 
bool operator< (const DWARFDie &LHS, const DWARFDie &RHS)
 
bool operator== (const DWARFDie::iterator &LHS, const DWARFDie::iterator &RHS)
 
bool operator!= (const DWARFDie::iterator &LHS, const DWARFDie::iterator &RHS)
 
bool operator== (const std::reverse_iterator< DWARFDie::iterator > &LHS, const std::reverse_iterator< DWARFDie::iterator > &RHS)
 
bool operator!= (const std::reverse_iterator< DWARFDie::iterator > &LHS, const std::reverse_iterator< DWARFDie::iterator > &RHS)
 
bool operator== (const DWARFExpression::iterator &LHS, const DWARFExpression::iterator &RHS)
 
bool operator!= (const DWARFExpression::iterator &LHS, const DWARFExpression::iterator &RHS)
 
const DWARFUnitIndexgetDWARFUnitIndex (DWARFContext &Context, DWARFSectionKind Kind)
 
static bool operator< (const DWARFVerifier::DieRangeInfo &LHS, const DWARFVerifier::DieRangeInfo &RHS)
 
LLVMAttributeRef wrap (Attribute Attr)
 
Attribute unwrap (LLVMAttributeRef Attr)
 
bool UpgradeIntrinsicFunction (Function *F, Function *&NewFn)
 This is a more granular function that simply checks an intrinsic function for upgrading, and returns true if it requires upgrading. More...
 
void UpgradeIntrinsicCall (CallInst *CI, Function *NewFn)
 This is the complement to the above, replacing a specific call to an intrinsic function with a call to the specified new function. More...
 
void UpgradeInlineAsmString (std::string *AsmStr)
 Upgrade comment in call to inline asm that represents an objc retain release marker. More...
 
void UpgradeCallsToIntrinsic (Function *F)
 This is an auto-upgrade hook for any old intrinsic function syntaxes which need to have both the function updated as well as all calls updated to the new function. More...
 
GlobalVariableUpgradeGlobalVariable (GlobalVariable *GV)
 This checks for global variables which should be upgraded. More...
 
bool UpgradeModuleFlags (Module &M)
 This checks for module flags which should be upgraded. More...
 
bool UpgradeRetainReleaseMarker (Module &M)
 This checks for objc retain release marker which should be upgraded. More...
 
void UpgradeSectionAttributes (Module &M)
 
MDNodeUpgradeTBAANode (MDNode &TBAANode)
 If the given TBAA tag uses the scalar TBAA format, create a new node corresponding to the upgrade to the struct-path aware TBAA format. More...
 
InstructionUpgradeBitCastInst (unsigned Opc, Value *V, Type *DestTy, Instruction *&Temp)
 This is an auto-upgrade for bitcast between pointers with different address spaces: the instruction is replaced by a pair ptrtoint+inttoptr. More...
 
ValueUpgradeBitCastExpr (unsigned Opc, Constant *C, Type *DestTy)
 This is an auto-upgrade for bitcast constant expression between pointers with different address spaces: the instruction is replaced by a pair ptrtoint+inttoptr. More...
 
bool UpgradeDebugInfo (Module &M)
 Check the debug info version number, if it is out-dated, drop the debug info. More...
 
bool mayBeOldLoopAttachmentTag (StringRef Name)
 Check whether a string looks like an old loop attachment tag. More...
 
MDNodeupgradeInstructionLoopAttachment (MDNode &N)
 Upgrade the loop attachment metadata node. More...
 
BasicBlock::iterator skipDebugIntrinsics (BasicBlock::iterator It)
 Advance It while it points to a debug instruction and return the result. More...
 
pred_iterator pred_begin (BasicBlock *BB)
 
const_pred_iterator pred_begin (const BasicBlock *BB)
 
pred_iterator pred_end (BasicBlock *BB)
 
const_pred_iterator pred_end (const BasicBlock *BB)
 
bool pred_empty (const BasicBlock *BB)
 
unsigned pred_size (const BasicBlock *BB)
 Get the number of predecessors of BB. More...
 
pred_range predecessors (BasicBlock *BB)
 
pred_const_range predecessors (const BasicBlock *BB)
 
succ_iterator succ_begin (Instruction *I)
 
succ_const_iterator succ_begin (const Instruction *I)
 
succ_iterator succ_end (Instruction *I)
 
succ_const_iterator succ_end (const Instruction *I)
 
bool succ_empty (const Instruction *I)
 
unsigned succ_size (const Instruction *I)
 
succ_range successors (Instruction *I)
 
succ_const_range successors (const Instruction *I)
 
succ_iterator succ_begin (BasicBlock *BB)
 
succ_const_iterator succ_begin (const BasicBlock *BB)
 
succ_iterator succ_end (BasicBlock *BB)
 
succ_const_iterator succ_end (const BasicBlock *BB)
 
bool succ_empty (const BasicBlock *BB)
 
unsigned succ_size (const BasicBlock *BB)
 
succ_range successors (BasicBlock *BB)
 
succ_const_range successors (const BasicBlock *BB)
 
raw_ostreamoperator<< (raw_ostream &OS, const Comdat &C)
 
raw_ostreamoperator<< (raw_ostream &OS, const ConstantRange &CR)
 
ConstantRange getConstantRangeFromMetadata (const MDNode &RangeMD)
 Parse out a conservative ConstantRange from !range metadata. More...
 
DataLayoutunwrap (LLVMTargetDataRef P)
 
LLVMTargetDataRef wrap (const DataLayout *P)
 
DISubprogramgetDISubprogram (const MDNode *Scope)
 Find subprogram that is enclosing this scope. More...
 
bool StripDebugInfo (Module &M)
 Strip debug info in the module if it exists. More...
 
bool stripDebugInfo (Function &F)
 
bool stripNonLineTableDebugInfo (Module &M)
 Downgrade the debug info in a module to contain only line table information. More...
 
unsigned getDebugMetadataVersionFromModule (const Module &M)
 Return Debug Info Metadata Version by checking module flags. More...
 
bool operator== (const DIExpression::FragmentInfo &A, const DIExpression::FragmentInfo &B)
 
bool operator< (const DIExpression::FragmentInfo &A, const DIExpression::FragmentInfo &B)
 
int getNextAvailablePluginDiagnosticKind ()
 Get the next available kind ID for a plugin diagnostic. More...
 
template<class RemarkT >
RemarkT & operator<< (RemarkT &R, typename std::enable_if< std::is_base_of< DiagnosticInfoOptimizationBase, RemarkT >::value, StringRef >::type S)
 Allow the insertion operator to return the actual remark type rather than a common base class. More...
 
template<class RemarkT >
RemarkT & operator<< (RemarkT &&R, typename std::enable_if< std::is_base_of< DiagnosticInfoOptimizationBase, RemarkT >::value, StringRef >::type S)
 Also allow r-value for the remark to allow insertion into a temporarily-constructed remark. More...
 
template<class RemarkT >
RemarkT & operator<< (RemarkT &R, typename std::enable_if< std::is_base_of< DiagnosticInfoOptimizationBase, RemarkT >::value, DiagnosticInfoOptimizationBase::Argument >::type A)
 
template<class RemarkT >
RemarkT & operator<< (RemarkT &&R, typename std::enable_if< std::is_base_of< DiagnosticInfoOptimizationBase, RemarkT >::value, DiagnosticInfoOptimizationBase::Argument >::type A)
 
template<class RemarkT >
RemarkT & operator<< (RemarkT &R, typename std::enable_if< std::is_base_of< DiagnosticInfoOptimizationBase, RemarkT >::value, DiagnosticInfoOptimizationBase::setIsVerbose >::type V)
 
template<class RemarkT >
RemarkT & operator<< (RemarkT &&R, typename std::enable_if< std::is_base_of< DiagnosticInfoOptimizationBase, RemarkT >::value, DiagnosticInfoOptimizationBase::setIsVerbose >::type V)
 
template<class RemarkT >
RemarkT & operator<< (RemarkT &R, typename std::enable_if< std::is_base_of< DiagnosticInfoOptimizationBase, RemarkT >::value, DiagnosticInfoOptimizationBase::setExtraArgs >::type EA)
 
bool NullPointerIsDefined (const Function *F, unsigned AS=0)
 Check whether null pointer dereferencing is considered undefined behavior for a given function or an address space. More...
 
gep_type_iterator gep_type_begin (const User *GEP)
 
gep_type_iterator gep_type_end (const User *GEP)
 
gep_type_iterator gep_type_begin (const User &GEP)
 
gep_type_iterator gep_type_end (const User &GEP)
 
template<typename T >
generic_gep_type_iterator< const T * > gep_type_begin (Type *Op0, ArrayRef< T > A)
 
template<typename T >
generic_gep_type_iterator< const T * > gep_type_end (Type *, ArrayRef< T > A)
 
inst_iterator inst_begin (Function *F)
 
inst_iterator inst_end (Function *F)
 
inst_range instructions (Function *F)
 
const_inst_iterator inst_begin (const Function *F)
 
const_inst_iterator inst_end (const Function *F)
 
const_inst_range instructions (const Function *F)
 
inst_iterator inst_begin (Function &F)
 
inst_iterator inst_end (Function &F)
 
inst_range instructions (Function &F)
 
const_inst_iterator inst_begin (const Function &F)
 
const_inst_iterator inst_end (const Function &F)
 
const_inst_range instructions (const Function &F)
 
TypecheckGEPType (Type *Ty)
 
ValuegetLoadStorePointerOperand (Value *V)
 A helper function that returns the pointer operand of a load or store instruction. More...
 
ValuegetPointerOperand (Value *V)
 A helper function that returns the pointer operand of a load, store or GEP instruction. More...
 
unsigned getLoadStoreAlignment (Value *I)
 A helper function that returns the alignment of load or store instruction. More...
 
unsigned getLoadStoreAddressSpace (Value *I)
 A helper function that returns the address space of the pointer operand of load or store instruction. More...
 
ModulePasscreatePrintModulePass (raw_ostream &OS, const std::string &Banner="", bool ShouldPreserveUseListOrder=false)
 Create and return a pass that writes the module to the specified raw_ostream. More...
 
FunctionPass * createPrintFunctionPass (raw_ostream &OS, const std::string &Banner="")
 Create and return a pass that prints functions to the specified raw_ostream as they are processed. More...
 
BasicBlockPass * createPrintBasicBlockPass (raw_ostream &OS, const std::string &Banner="")
 Create and return a pass that writes the BB to the specified raw_ostream. More...
 
void printLLVMNameWithoutPrefix (raw_ostream &OS, StringRef Name)
 Print out a name of an LLVM value without any prefixes. More...
 
bool isIRPrintingPass (Pass *P)
 Return true if a pass is for IR printing. More...
 
bool isFunctionInPrintList (StringRef FunctionName)
 isFunctionInPrintList - returns true if a function should be printed via More...
 
bool forcePrintModuleIR ()
 forcePrintModuleIR - returns true if IR printing passes should More...
 
bool shouldPrintBeforePass ()
 This is a helper to determine whether to print IR before or after a pass. More...
 
bool shouldPrintBeforePass (StringRef)
 
bool shouldPrintAfterPass ()
 
bool shouldPrintAfterPass (StringRef)
 
LLVMContext ** unwrap (LLVMContextRef *Tys)
 
LLVMContextRef * wrap (const LLVMContext **Tys)
 
void emitLinkerFlagsForGlobalCOFF (raw_ostream &OS, const GlobalValue *GV, const Triple &TT, Mangler &Mangler)
 
void emitLinkerFlagsForUsedCOFF (raw_ostream &OS, const GlobalValue *GV, const Triple &T, Mangler &M)
 
Metadata ** unwrap (LLVMMetadataRef *MDs)
 
raw_ostreamoperator<< (raw_ostream &OS, const Metadata &MD)
 
GlobalVariablecollectUsedGlobalVariables (const Module &M, SmallPtrSetImpl< GlobalValue * > &Set, bool CompilerUsed)
 Given "llvm.used" or "llvm.compiler.used" as a global name, collect the initializer elements of that global in Set and return the global itself. More...
 
raw_ostreamoperator<< (raw_ostream &O, const Module &M)
 An raw_ostream inserter for modules. More...
 
Moduleunwrap (LLVMModuleProviderRef MP)
 
const chargetHotnessName (CalleeInfo::HotnessType HT)
 
raw_ostreamoperator<< (raw_ostream &OS, const ValueInfo &VI)
 
bool operator== (const ValueInfo &A, const ValueInfo &B)
 
bool operator!= (const ValueInfo &A, const ValueInfo &B)
 
bool operator< (const ValueInfo &A, const ValueInfo &B)
 
static bool canImportGlobalVar (GlobalValueSummary *S)
 
template<typename FunctionPassT >
ModuleToFunctionPassAdaptor< FunctionPassT > createModuleToFunctionPassAdaptor (FunctionPassT Pass)
 A function to deduce a function pass type and wrap it in the templated adaptor. More...
 
template<typename PassT >
RepeatedPass< PassT > createRepeatedPass (int Count, PassT P)
 
void reportAndResetTimings (raw_ostream *OutStream=nullptr)
 If -time-passes has been specified, report the timings immediately and then reset the timers to zero. More...
 
TimergetPassTimer (Pass *)
 Request the timer for this legacy-pass-manager's pass instance. More...
 
Expected< std::unique_ptr< ToolOutputFile > > setupOptimizationRemarks (LLVMContext &Context, StringRef RemarksFilename, StringRef RemarksPasses, StringRef RemarksFormat, bool RemarksWithHotness, unsigned RemarksHotnessThreshold=0)
 Setup optimization remarks. More...
 
void verifySafepointIR (Function &F)
 Run the safepoint verifier over a single function. Crashes on failure. More...
 
FunctionPass * createSafepointIRVerifierPass ()
 Create an instance of the safepoint verifier pass which can be added to a pass pipeline to check for relocation bugs. More...
 
bool isStatepoint (const CallBase *Call)
 
bool isStatepoint (const Value *V)
 
bool isStatepoint (const Value &V)
 
bool isGCRelocate (const CallBase *Call)
 
bool isGCRelocate (const Value *V)
 
bool isGCResult (const CallBase *Call)
 
bool isGCResult (const Value *V)
 
StatepointDirectives parseStatepointDirectivesFromAttrs (AttributeList AS)
 Parse out statepoint directives from the function attributes present in AS. More...
 
bool isStatepointDirectiveAttr (Attribute Attr)
 Return true if the Attr is an attribute that is a statepoint directive. More...
 
raw_ostreamoperator<< (raw_ostream &OS, const Type &T)
 
Type ** unwrap (LLVMTypeRef *Tys)
 
LLVMTypeRef * wrap (Type **Tys)
 
raw_ostreamoperator<< (raw_ostream &OS, const Value &V)
 
Value ** unwrap (LLVMValueRef *Vals)
 
template<typename T >
T ** unwrap (LLVMValueRef *Vals, unsigned Length)
 
LLVMValueRef * wrap (const Value **Vals)
 
bool verifyFunction (const Function &F, raw_ostream *OS=nullptr)
 Check a function for errors, useful for use when debugging a pass. More...
 
bool verifyModule (const Module &M, raw_ostream *OS=nullptr, bool *BrokenDebugInfo=nullptr)
 Check a module for errors. More...
 
FunctionPass * createVerifierPass (bool FatalErrors=true)
 
bool verifyModule (bool &BrokenDebugInfo, const Module &M, raw_ostream *OS)
 Check a module for errors, but report debug info errors separately. More...
 
std::unique_ptr< ModulegetLazyIRModule (std::unique_ptr< MemoryBuffer > Buffer, SMDiagnostic &Err, LLVMContext &Context, bool ShouldLazyLoadMetadata=false)
 If the given MemoryBuffer holds a bitcode image, return a Module for it which does lazy deserialization of function bodies. More...
 
std::unique_ptr< ModulegetLazyIRFileModule (StringRef Filename, SMDiagnostic &Err, LLVMContext &Context, bool ShouldLazyLoadMetadata=false)
 If the given file holds a bitcode image, return a Module for it which does lazy deserialization of function bodies. More...
 
std::unique_ptr< ModuleparseIR (MemoryBufferRef Buffer, SMDiagnostic &Err, LLVMContext &Context, bool UpgradeDebugInfo=true, StringRef DataLayoutString="")
 If the given MemoryBuffer holds a bitcode image, return a Module for it. More...
 
std::unique_ptr< ModuleparseIRFile (StringRef Filename, SMDiagnostic &Err, LLVMContext &Context, bool UpgradeDebugInfo=true, StringRef DataLayoutString="")
 If the given file holds a bitcode image, return a Module for it. More...
 
void updateCompilerUsed (Module &TheModule, const TargetMachine &TM, const StringSet<> &AsmUndefinedRefs)
 Find all globals in TheModule that are referenced in AsmUndefinedRefs, as well as the user-supplied functions definitions that are also libcalls, and create or update the magic "llvm.compiler_used" global in TheModule. More...
 
void thinLTOResolvePrevailingInIndex (ModuleSummaryIndex &Index, function_ref< bool(GlobalValue::GUID, const GlobalValueSummary *)> isPrevailing, function_ref< void(StringRef, GlobalValue::GUID, GlobalValue::LinkageTypes)> recordNewLinkage, const DenseSet< GlobalValue::GUID > &GUIDPreservedSymbols)
 Resolve linkage for prevailing symbols in the Index. More...
 
void thinLTOInternalizeAndPromoteInIndex (ModuleSummaryIndex &Index, function_ref< bool(StringRef, GlobalValue::GUID)> isExported)
 Update the linkages in the given Index to mark exported values as external and non-exported values as internal. More...
 
void computeLTOCacheKey (SmallString< 40 > &Key, const lto::Config &Conf, const ModuleSummaryIndex &Index, StringRef ModuleID, const FunctionImporter::ImportMapTy &ImportList, const FunctionImporter::ExportSetTy &ExportList, const std::map< GlobalValue::GUID, GlobalValue::LinkageTypes > &ResolvedODR, const GVSummaryMapTy &DefinedGlobals, const std::set< GlobalValue::GUID > &CfiFunctionDefs={}, const std::set< GlobalValue::GUID > &CfiFunctionDecls={})
 Computes a unique hash for the Module considering the current list of export/import and other global analysis results. More...
 
void computeSyntheticCounts (ModuleSummaryIndex &Index)
 Compute synthetic function entry counts. More...
 
template<typename AnalysisT , typename IRUnitT , typename AnalysisManagerT , typename... ExtraArgTs>
bool parseAnalysisUtilityPasses (StringRef AnalysisName, StringRef PipelineName, PassManager< IRUnitT, AnalysisManagerT, ExtraArgTs... > &PM)
 This utility template takes care of adding require<> and invalidate<> passes for an analysis to a given PassManager. More...
 
bool operator< (AtomicOrderingCABI, AtomicOrderingCABI)=delete
 
bool operator> (AtomicOrderingCABI, AtomicOrderingCABI)=delete
 
bool operator<= (AtomicOrderingCABI, AtomicOrderingCABI)=delete
 
bool operator>= (AtomicOrderingCABI, AtomicOrderingCABI)=delete
 
template<typename Int >
bool isValidAtomicOrderingCABI (Int I)
 
bool operator< (AtomicOrdering, AtomicOrdering)=delete
 
bool operator> (AtomicOrdering, AtomicOrdering)=delete
 
bool operator<= (AtomicOrdering, AtomicOrdering)=delete
 
bool operator>= (AtomicOrdering, AtomicOrdering)=delete
 
template<typename Int >
bool isValidAtomicOrdering (Int I)
 
const chartoIRString (AtomicOrdering ao)
 String used by LLVM IR to represent atomic ordering. More...
 
bool isStrongerThan (AtomicOrdering ao, AtomicOrdering other)
 Returns true if ao is stronger than other as defined by the AtomicOrdering lattice, which is based on C++'s definition. More...
 
bool isAtLeastOrStrongerThan (AtomicOrdering ao, AtomicOrdering other)
 
bool isStrongerThanUnordered (AtomicOrdering ao)
 
bool isStrongerThanMonotonic (AtomicOrdering ao)
 
bool isAcquireOrStronger (AtomicOrdering ao)
 
bool isReleaseOrStronger (AtomicOrdering ao)
 
AtomicOrderingCABI toCABI (AtomicOrdering ao)
 
raw_ostreamoperator<< (raw_ostream &OS, BranchProbability Prob)
 
void BuryPointer (const void *Ptr)
 
template<typename T >
void BuryPointer (std::unique_ptr< T > Ptr)
 
Expected< CachePruningPolicyparseCachePruningPolicy (StringRef PolicyStr)
 Parse the given string as a cache pruning policy. More...
 
bool pruneCache (StringRef Path, CachePruningPolicy Policy)
 Peform pruning using the supplied policy, returns true if pruning occurred, i.e. More...
 
template<typename T >
static size_t capacity_in_bytes (const T &x)
 
template<class X , class Y >
LLVM_NODISCARD bool isa (const Y &Val)
 
template<class X , class Y >
LLVM_NODISCARD bool isa_and_nonnull (const Y &Val)
 
template<class X , class Y >
std::enable_if<!is_simple_type< Y >::value, typenamecast_retty< X, constY >::ret_type >::type cast (const Y &Val)
 
template<class X , class Y >
cast_retty< X, Y >::ret_type cast (Y &Val)
 
template<class X , class Y >
cast_retty< X, Y * >::ret_type cast (Y *Val)
 
template<class X , class Y >
cast_retty< X, std::unique_ptr< Y > >::ret_type cast (std::unique_ptr< Y > &&Val)
 
template<class X , class Y >
LLVM_NODISCARD std::enable_if<!is_simple_type< Y >::value, typenamecast_retty< X, constY >::ret_type >::type cast_or_null (const Y &Val)
 
template<class X , class Y >
LLVM_NODISCARD std::enable_if<!is_simple_type< Y >::value, typenamecast_retty< X, Y >::ret_type >::type cast_or_null (Y &Val)
 
template<class X , class Y >
LLVM_NODISCARD cast_retty< X, Y * >::ret_type cast_or_null (Y *Val)
 
template<class X , class Y >
cast_retty< X, std::unique_ptr< Y > >::ret_type cast_or_null (std::unique_ptr< Y > &&Val)
 
template<class X , class Y >
LLVM_NODISCARD std::enable_if<!is_simple_type< Y >::value, typenamecast_retty< X, constY >::ret_type >::type dyn_cast (const Y &Val)
 
template<class X , class Y >
LLVM_NODISCARD cast_retty< X, Y >::ret_type dyn_cast (Y &Val)
 
template<class X , class Y >
LLVM_NODISCARD cast_retty< X, Y * >::ret_type dyn_cast (Y *Val)
 
template<class X , class Y >
LLVM_NODISCARD std::enable_if<!is_simple_type< Y >::value, typenamecast_retty< X, constY >::ret_type >::type dyn_cast_or_null (const Y &Val)
 
template<class X , class Y >
LLVM_NODISCARD std::enable_if<!is_simple_type< Y >::value, typenamecast_retty< X, Y >::ret_type >::type dyn_cast_or_null (Y &Val)
 
template<class X , class Y >
LLVM_NODISCARD cast_retty< X, Y * >::ret_type dyn_cast_or_null (Y *Val)
 
template<class X , class Y >
LLVM_NODISCARD auto unique_dyn_cast (std::unique_ptr< Y > &Val) -> decltype(cast< X >(Val))
 
template<class X , class Y >
LLVM_NODISCARD auto unique_dyn_cast (std::unique_ptr< Y > &&Val) -> decltype(cast< X >(Val))
 
template<class X , class Y >
LLVM_NODISCARD auto unique_dyn_cast_or_null (std::unique_ptr< Y > &Val) -> decltype(cast< X >(Val))
 
template<class X , class Y >
LLVM_NODISCARD auto unique_dyn_cast_or_null (std::unique_ptr< Y > &&Val) -> decltype(cast< X >(Val))
 
template<typename T >
std::enable_if< std::is_signed< T >::value, llvm::Optional< T > >::type checkedAdd (T LHS, T RHS)
 Add two signed integers LHS and RHS. More...
 
template<typename T >
std::enable_if< std::is_signed< T >::value, llvm::Optional< T > >::type checkedSub (T LHS, T RHS)
 Subtract two signed integers LHS and RHS. More...
 
template<typename T >
std::enable_if< std::is_signed< T >::value, llvm::Optional< T > >::type checkedMul (T LHS, T RHS)
 Multiply two signed integers LHS and RHS. More...
 
template<typename T >
std::enable_if< std::is_signed< T >::value, llvm::Optional< T > >::type checkedMulAdd (T A, T B, T C)
 Multiply A and B, and add C to the resulting product. More...
 
template<typename T >
std::enable_if< std::is_unsigned< T >::value, llvm::Optional< T > >::type checkedAddUnsigned (T LHS, T RHS)
 Add two unsigned integers LHS and RHS. More...
 
template<typename T >
std::enable_if< std::is_unsigned< T >::value, llvm::Optional< T > >::type checkedMulUnsigned (T LHS, T RHS)
 Multiply two unsigned integers LHS and RHS. More...
 
template<typename T >
std::enable_if< std::is_unsigned< T >::value, llvm::Optional< T > >::type checkedMulAddUnsigned (T A, T B, T C)
 Multiply unsigned integers A and B, and add C to the resulting product. More...
 
raw_ostreamoperator<< (raw_ostream &OS, sys::TimePoint<> TP)
 
void * allocate_buffer (size_t Size, size_t Alignment)
 Allocate a buffer of memory with the given size and alignment. More...
 
void deallocate_buffer (void *Ptr, size_t Size, size_t Alignment)
 Deallocate a buffer of memory with the given size and alignment. More...
 
ConversionResult ConvertUTF8toUTF16 (const UTF8 **sourceStart, const UTF8 *sourceEnd, UTF16 **targetStart, UTF16 *targetEnd, ConversionFlags flags)
 
ConversionResult ConvertUTF8toUTF32Partial (const UTF8 **sourceStart, const UTF8 *sourceEnd, UTF32 **targetStart, UTF32 *targetEnd, ConversionFlags flags)
 Convert a partial UTF8 sequence to UTF32. More...
 
ConversionResult ConvertUTF8toUTF32 (const UTF8 **sourceStart, const UTF8 *sourceEnd, UTF32 **targetStart, UTF32 *targetEnd, ConversionFlags flags)
 Convert a partial UTF8 sequence to UTF32. More...
 
ConversionResult ConvertUTF16toUTF8 (const UTF16 **sourceStart, const UTF16 *sourceEnd, UTF8 **targetStart, UTF8 *targetEnd, ConversionFlags flags)
 
ConversionResult ConvertUTF32toUTF8 (const UTF32 **sourceStart, const UTF32 *sourceEnd, UTF8 **targetStart, UTF8 *targetEnd, ConversionFlags flags)
 
ConversionResult ConvertUTF16toUTF32 (const UTF16 **sourceStart, const UTF16 *sourceEnd, UTF32 **targetStart, UTF32 *targetEnd, ConversionFlags flags)
 
ConversionResult ConvertUTF32toUTF16 (const UTF32 **sourceStart, const UTF32 *sourceEnd, UTF16 **targetStart, UTF16 *targetEnd, ConversionFlags flags)
 
Boolean isLegalUTF8Sequence (const UTF8 *source, const UTF8 *sourceEnd)
 
Boolean isLegalUTF8String (const UTF8 **source, const UTF8 *sourceEnd)
 
unsigned getNumBytesForUTF8 (UTF8 firstByte)
 
bool ConvertUTF8toWide (unsigned WideCharWidth, llvm::StringRef Source, char *&ResultPtr, const UTF8 *&ErrorPtr)
 Convert an UTF8 StringRef to UTF8, UTF16, or UTF32 depending on WideCharWidth. More...
 
bool ConvertUTF8toWide (llvm::StringRef Source, std::wstring &Result)
 Converts a UTF-8 StringRef to a std::wstring. More...
 
bool ConvertUTF8toWide (const char *Source, std::wstring &Result)
 Converts a UTF-8 C-string to a std::wstring. More...
 
bool convertWideToUTF8 (const std::wstring &Source, std::string &Result)
 Converts a std::wstring to a UTF-8 encoded std::string. More...
 
bool ConvertCodePointToUTF8 (unsigned Source, char *&ResultPtr)
 Convert an Unicode code point to UTF8 sequence. More...
 
ConversionResult convertUTF8Sequence (const UTF8 **source, const UTF8 *sourceEnd, UTF32 *target, ConversionFlags flags)
 Convert the first UTF8 sequence in the given source buffer to a UTF32 code point. More...
 
bool hasUTF16ByteOrderMark (ArrayRef< char > SrcBytes)
 Returns true if a blob of text starts with a UTF-16 big or little endian byte order mark. More...
 
bool convertUTF16ToUTF8String (ArrayRef< char > SrcBytes, std::string &Out)
 Converts a stream of raw bytes assumed to be UTF16 into a UTF8 std::string. More...
 
bool convertUTF16ToUTF8String (ArrayRef< UTF16 > Src, std::string &Out)
 Converts a UTF16 string into a UTF8 std::string. More...
 
bool convertUTF8ToUTF16String (StringRef SrcUTF8, SmallVectorImpl< UTF16 > &DstUTF16)
 Converts a UTF-8 string into a UTF-16 string with native endianness. More...
 
uint32_t crc32 (uint32_t CRC, StringRef S)
 zlib independent CRC32 calculation. More...
 
uint24_t getSwappedBytes (uint24_t C)
 Needed by swapByteOrder(). More...
 
bool isCurrentDebugType (const char *Type)
 isCurrentDebugType - Return true if the specified string is the debug type specified on the command line, or if none was specified on the command line with the -debug-only=X option. More...
 
void setCurrentDebugType (const char *Type)
 setCurrentDebugType - Set the current debug type, as if the -debug-only=X option were specified. More...
 
void setCurrentDebugTypes (const char **Types, unsigned Count)
 setCurrentDebugTypes - Set the current debug type, as if the -debug-only=X,Y,Z option were specified. More...
 
raw_ostreamdbgs ()
 dbgs() - This returns a reference to a raw_ostream for debugging messages. More...
 
uint32_t djbHash (StringRef Buffer, uint32_t H=5381)
 The Bernstein hash function used by the DWARF accelerator tables. More...
 
uint32_t caseFoldingDjbHash (StringRef Buffer, uint32_t H=5381)
 Computes the Bernstein hash after folding the input according to the Dwarf 5 standard case folding rules. More...
 
std::error_code make_error_code (errc E)
 
template<typename ErrT , typename... ArgTs>
Error make_error (ArgTs &&... Args)
 Make a Error instance representing failure using the given error info type. More...
 
Error joinErrors (Error E1, Error E2)
 Concatenate errors. More...
 
LLVM_ATTRIBUTE_NORETURN void report_fatal_error (Error Err, bool gen_crash_diag=true)
 Report a serious error, calling any installed error handler. More...
 
void cantFail (Error Err, const char *Msg=nullptr)
 Report a fatal error if Err is a failure value. More...
 
template<typename T >
cantFail (Expected< T > ValOrErr, const char *Msg=nullptr)
 Report a fatal error if ValOrErr is a failure value, otherwise unwraps and returns the contained value. More...
 
template<typename T >
T & cantFail (Expected< T & > ValOrErr, const char *Msg=nullptr)
 Report a fatal error if ValOrErr is a failure value, otherwise unwraps and returns the contained reference. More...
 
Error handleErrorImpl (std::unique_ptr< ErrorInfoBase > Payload)
 
template<typename HandlerT , typename... HandlerTs>
Error handleErrorImpl (std::unique_ptr< ErrorInfoBase > Payload, HandlerT &&Handler, HandlerTs &&... Handlers)
 
template<typename... HandlerTs>
Error handleErrors (Error E, HandlerTs &&... Hs)
 Pass the ErrorInfo(s) contained in E to their respective handlers. More...
 
template<typename... HandlerTs>
void handleAllErrors (Error E, HandlerTs &&... Handlers)
 Behaves the same as handleErrors, except that by contract all errors must be handled by the given handlers (i.e. More...
 
void handleAllErrors (Error E)
 Check that E is a non-error, then drop it. More...
 
template<typename T , typename RecoveryFtor , typename... HandlerTs>
Expected< T > handleExpected (Expected< T > ValOrErr, RecoveryFtor &&RecoveryPath, HandlerTs &&... Handlers)
 Handle any errors (if present) in an Expected<T>, then try a recovery path. More...
 
void logAllUnhandledErrors (Error E, raw_ostream &OS, Twine ErrorBanner={})
 Log all errors (if any) in E to OS. More...
 
std::string toString (Error E)
 Write all error messages (if any) in E to a string. More...
 
void consumeError (Error Err)
 Consume a Error without doing anything. More...
 
bool errorToBool (Error Err)
 Helper for converting an Error to a bool. More...
 
std::error_code inconvertibleErrorCode ()
 The value returned by this function can be returned from convertToErrorCode for Error values where no sensible translation to std::error_code exists. More...
 
Error errorCodeToError (std::error_code EC)
 Helper for converting an std::error_code to a Error. More...
 
std::error_code errorToErrorCode (Error Err)
 Helper for converting an ECError to a std::error_code. More...
 
template<typename T >
Expected< T > errorOrToExpected (ErrorOr< T > &&EO)
 Convert an ErrorOr<T> to an Expected<T>. More...
 
template<typename T >
ErrorOr< T > expectedToErrorOr (Expected< T > &&E)
 Convert an Expected<T> to an ErrorOr<T>. More...
 
template<typename... Ts>
Error createStringError (std::error_code EC, char const *Fmt, const Ts &... Vals)
 Create formatted StringError object. More...
 
Error createStringError (std::error_code EC, char const *Msg)
 
template<typename... Ts>
Error createStringError (std::errc EC, char const *Fmt, const Ts &... Vals)
 
Error createFileError (const Twine &F, Error E)
 Concatenate a source file path and/or name with an Error. More...
 
Error createFileError (const Twine &F, size_t Line, Error E)
 Concatenate a source file path and/or name with line number and an Error. More...
 
Error createFileError (const Twine &F, std::error_code EC)
 Concatenate a source file path and/or name with a std::error_code to form an Error object. More...
 
Error createFileError (const Twine &F, size_t Line, std::error_code EC)
 Concatenate a source file path and/or name with line number and std::error_code to form an Error object. More...
 
Error createFileError (const Twine &F, ErrorSuccess)=delete
 
LLVMErrorRef wrap (Error Err)
 Conversion from Error to LLVMErrorRef for C error bindings. More...
 
Error unwrap (LLVMErrorRef ErrRef)
 Conversion from LLVMErrorRef to Error for C error bindings. More...
 
void install_fatal_error_handler (fatal_error_handler_t handler, void *user_data=nullptr)
 install_fatal_error_handler - Installs a new error handler to be used whenever a serious (non-recoverable) error is encountered by LLVM. More...
 
void remove_fatal_error_handler ()
 Restores default error handling behaviour. More...
 
LLVM_ATTRIBUTE_NORETURN void report_fatal_error (const char *reason, bool gen_crash_diag=true)
 Reports a serious error, calling any installed error handler. More...
 
LLVM_ATTRIBUTE_NORETURN void report_fatal_error (const std::string &reason, bool gen_crash_diag=true)
 
LLVM_ATTRIBUTE_NORETURN void report_fatal_error (StringRef reason, bool gen_crash_diag=true)
 
LLVM_ATTRIBUTE_NORETURN void report_fatal_error (const Twine &reason, bool gen_crash_diag=true)
 
void install_bad_alloc_error_handler (fatal_error_handler_t handler, void *user_data=nullptr)
 Installs a new bad alloc error handler that should be used whenever a bad alloc error, e.g. More...
 
void remove_bad_alloc_error_handler ()
 Restores default bad alloc error handling behavior. More...
 
void install_out_of_memory_new_handler ()
 
void report_bad_alloc_error (const char *Reason, bool GenCrashDiag=true)
 Reports a bad alloc error, calling any user defined bad alloc error handler. More...
 
LLVM_ATTRIBUTE_NORETURN void llvm_unreachable_internal (const char *msg=nullptr, const char *file=nullptr, unsigned line=0)
 This function calls abort(), and prints the optional message to stderr. More...
 
template<class T , class E >
std::enable_if< std::is_error_code_enum< E >::value||std::is_error_condition_enum< E >::value, bool >::type operator== (const ErrorOr< T > &Err, E Code)
 
int DiffFilesWithTolerance (StringRef FileA, StringRef FileB, double AbsTol, double RelTol, std::string *Error=nullptr)
 DiffFilesWithTolerance - Compare the two files specified, returning 0 if the files match, 1 if they are different, and 2 if there is a file error. More...
 
template<typename... Ts>
format_object< Ts... > format (const char *Fmt, const Ts &... Vals)
 These are helper functions used to produce formatted output. More...
 
FormattedString left_justify (StringRef Str, unsigned Width)
 left_justify - append spaces after string so total output is Width characters. More...
 
FormattedString right_justify (StringRef Str, unsigned Width)
 right_justify - add spaces before string so total output is Width characters. More...
 
FormattedString center_justify (StringRef Str, unsigned Width)
 center_justify - add spaces before and after string so total output is Width characters. More...
 
FormattedNumber format_hex (uint64_t N, unsigned Width, bool Upper=false)
 format_hex - Output N as a fixed width hexadecimal. More...
 
FormattedNumber format_hex_no_prefix (uint64_t N, unsigned Width, bool Upper=false)
 format_hex_no_prefix - Output N as a fixed width hexadecimal. More...
 
FormattedNumber format_decimal (int64_t N, unsigned Width)
 format_decimal - Output N as a right justified, fixed-width decimal. More...
 
FormattedBytes format_bytes (ArrayRef< uint8_t > Bytes, Optional< uint64_t > FirstByteOffset=None, uint32_t NumPerLine=16, uint8_t ByteGroupSize=4, uint32_t IndentLevel=0, bool Upper=false)
 
FormattedBytes format_bytes_with_ascii (ArrayRef< uint8_t > Bytes, Optional< uint64_t > FirstByteOffset=None, uint32_t NumPerLine=16, uint8_t ByteGroupSize=4, uint32_t IndentLevel=0, bool Upper=false)
 
template<typename T >
detail::AlignAdapter< T > fmt_align (T &&Item, AlignStyle Where, size_t Amount, char Fill=' ')
 
template<typename T >
detail::PadAdapter< T > fmt_pad (T &&Item, size_t Left, size_t Right)
 
template<typename T >
detail::RepeatAdapter< T > fmt_repeat (T &&Item, size_t Count)
 
detail::ErrorAdapter fmt_consume (Error &&Item)
 
formatted_raw_ostreamfouts ()
 fouts() - This returns a reference to a formatted_raw_ostream for standard output. More...
 
formatted_raw_ostreamferrs ()
 ferrs() - This returns a reference to a formatted_raw_ostream for standard error. More...
 
formatted_raw_ostreamfdbgs ()
 fdbgs() - This returns a reference to a formatted_raw_ostream for debug output. More...
 
template<typename... Ts>
auto formatv (const char *Fmt, Ts &&... Vals) -> formatv_object< decltype(std::make_tuple(detail::build_format_adapter(std::forward< Ts >(Vals))...))>
 
template<class NodeT >
raw_ostreamoperator<< (raw_ostream &O, const DomTreeNodeBase< NodeT > *Node)
 
template<class NodeT >
void PrintDomTree (const DomTreeNodeBase< NodeT > *N, raw_ostream &O, unsigned Lev)
 
bool DisplayGraph (StringRef Filename, bool wait=true, GraphProgram::Name program=GraphProgram::DOT)
 
template<typename GraphType >
raw_ostreamWriteGraph (raw_ostream &O, const GraphType &G, bool ShortNames=false, const Twine &Title="")
 
std::string createGraphFilename (const Twine &Name, int &FD)
 
unsigned encodeSLEB128 (int64_t Value, raw_ostream &OS, unsigned PadTo=0)
 Utility function to encode a SLEB128 value to an output stream. More...
 
unsigned encodeSLEB128 (int64_t Value, uint8_t *p, unsigned PadTo=0)
 Utility function to encode a SLEB128 value to a buffer. More...
 
unsigned encodeULEB128 (uint64_t Value, raw_ostream &OS, unsigned PadTo=0)
 Utility function to encode a ULEB128 value to an output stream. More...
 
unsigned encodeULEB128 (uint64_t Value, uint8_t *p, unsigned PadTo=0)
 Utility function to encode a ULEB128 value to a buffer. More...
 
uint64_t decodeULEB128 (const uint8_t *p, unsigned *n=nullptr, const uint8_t *end=nullptr, const char **error=nullptr)
 Utility function to decode a ULEB128 value. More...
 
int64_t decodeSLEB128 (const uint8_t *p, unsigned *n=nullptr, const uint8_t *end=nullptr, const char **error=nullptr)
 Utility function to decode a SLEB128 value. More...
 
unsigned getULEB128Size (uint64_t Value)
 Utility function to get the size of the ULEB128-encoded value. More...
 
unsigned getSLEB128Size (int64_t Value)
 Utility function to get the size of the SLEB128-encoded value. More...
 
raw_ostreamoperator<< (raw_ostream &OS, const LLT &Ty)
 
void llvm_shutdown ()
 llvm_shutdown - Deallocate and destroy all ManagedStatic variables. More...
 
template<typename T >
unsigned countTrailingZeros (T Val, ZeroBehavior ZB=ZB_Width)
 Count number of 0's from the least significant bit to the most stopping at the first 1. More...
 
template<typename T >
unsigned countLeadingZeros (T Val, ZeroBehavior ZB=ZB_Width)
 Count number of 0's from the most significant bit to the least stopping at the first 1. More...
 
template<typename T >
findFirstSet (T Val, ZeroBehavior ZB=ZB_Max)
 Get the index of the first set bit starting from the least significant bit. More...
 
template<typename T >
maskTrailingOnes (unsigned N)
 Create a bitmask with the N right-most bits set to 1, and all other bits set to 0. More...
 
template<typename T >
maskLeadingOnes (unsigned N)
 Create a bitmask with the N left-most bits set to 1, and all other bits set to 0. More...
 
template<typename T >
maskTrailingZeros (unsigned N)
 Create a bitmask with the N right-most bits set to 0, and all other bits set to 1. More...
 
template<typename T >
maskLeadingZeros (unsigned N)
 Create a bitmask with the N left-most bits set to 0, and all other bits set to 1. More...
 
template<typename T >
findLastSet (T Val, ZeroBehavior ZB=ZB_Max)
 Get the index of the last set bit starting from the least significant bit. More...
 
template<typename T >
reverseBits (T Val)
 Reverse the bits in Val. More...
 
constexpr uint32_t Hi_32 (uint64_t Value)
 Return the high 32 bits of a 64 bit value. More...
 
constexpr uint32_t Lo_32 (uint64_t Value)
 Return the low 32 bits of a 64 bit value. More...
 
constexpr uint64_t Make_64 (uint32_t High, uint32_t Low)
 Make a 64-bit integer from a high / low pair of 32-bit integers. More...
 
template<unsigned N>
constexpr bool isInt (int64_t x)
 Checks if an integer fits into the given bit width. More...
 
template<>
constexpr bool isInt< 8 > (int64_t x)
 
template<>
constexpr bool isInt< 16 > (int64_t x)
 
template<>
constexpr bool isInt< 32 > (int64_t x)
 
template<unsigned N, unsigned S>
constexpr bool isShiftedInt (int64_t x)
 Checks if a signed integer is an N bit number shifted left by S. More...
 
template<unsigned N>
constexpr std::enable_if<(N< 64), bool >::type isUInt (uint64_t X)
 Checks if an unsigned integer fits into the given bit width. More...
 
constexpr bool ::type isUInt (uint64_t X)
 
template<>
constexpr bool isUInt< 8 > (uint64_t x)
 
template<>
constexpr bool isUInt< 16 > (uint64_t x)
 
template<>
constexpr bool isUInt< 32 > (uint64_t x)
 
template<unsigned N, unsigned S>
constexpr bool isShiftedUInt (uint64_t x)
 Checks if a unsigned integer is an N bit number shifted left by S. More...
 
uint64_t maxUIntN (uint64_t N)
 Gets the maximum value for a N-bit unsigned integer. More...
 
int64_t minIntN (int64_t N)
 Gets the minimum value for a N-bit signed integer. More...
 
int64_t maxIntN (int64_t N)
 Gets the maximum value for a N-bit signed integer. More...
 
bool isUIntN (unsigned N, uint64_t x)
 Checks if an unsigned integer fits into the given (dynamic) bit width. More...
 
bool isIntN (unsigned N, int64_t x)
 Checks if an signed integer fits into the given (dynamic) bit width. More...
 
constexpr bool isMask_32 (uint32_t Value)
 Return true if the argument is a non-empty sequence of ones starting at the least significant bit with the remainder zero (32 bit version). More...
 
constexpr bool isMask_64 (uint64_t Value)
 Return true if the argument is a non-empty sequence of ones starting at the least significant bit with the remainder zero (64 bit version). More...
 
constexpr bool isShiftedMask_32 (uint32_t Value)
 Return true if the argument contains a non-empty sequence of ones with the remainder zero (32 bit version.) Ex. More...
 
constexpr bool isShiftedMask_64 (uint64_t Value)
 Return true if the argument contains a non-empty sequence of ones with the remainder zero (64 bit version.) More...
 
constexpr bool isPowerOf2_32 (uint32_t Value)
 Return true if the argument is a power of two > 0. More...
 
constexpr bool isPowerOf2_64 (uint64_t Value)
 Return true if the argument is a power of two > 0 (64 bit edition.) More...
 
uint16_t ByteSwap_16 (uint16_t Value)
 Return a byte-swapped representation of the 16-bit argument. More...
 
uint32_t ByteSwap_32 (uint32_t Value)
 Return a byte-swapped representation of the 32-bit argument. More...
 
uint64_t ByteSwap_64 (uint64_t Value)
 Return a byte-swapped representation of the 64-bit argument. More...
 
template<typename T >
unsigned countLeadingOnes (T Value, ZeroBehavior ZB=ZB_Width)
 Count the number of ones from the most significant bit to the first zero bit. More...
 
template<typename T >
unsigned countTrailingOnes (T Value, ZeroBehavior ZB=ZB_Width)
 Count the number of ones from the least significant bit to the first zero bit. More...
 
template<typename T >
unsigned countPopulation (T Value)
 Count the number of set bits in a value. More...
 
double Log2 (double Value)
 Return the log base 2 of the specified value. More...
 
unsigned Log2_32 (uint32_t Value)
 Return the floor log base 2 of the specified value, -1 if the value is zero. More...
 
unsigned Log2_64 (uint64_t Value)
 Return the floor log base 2 of the specified value, -1 if the value is zero. More...
 
unsigned Log2_32_Ceil (uint32_t Value)
 Return the ceil log base 2 of the specified value, 32 if the value is zero. More...
 
unsigned Log2_64_Ceil (uint64_t Value)
 Return the ceil log base 2 of the specified value, 64 if the value is zero. More...
 
template<typename T >
greatestCommonDivisor (T A, T B)
 Return the greatest common divisor of the values using Euclid's algorithm. More...
 
uint64_t GreatestCommonDivisor64 (uint64_t A, uint64_t B)
 
double BitsToDouble (uint64_t Bits)
 This function takes a 64-bit integer and returns the bit equivalent double. More...
 
float BitsToFloat (uint32_t Bits)
 This function takes a 32-bit integer and returns the bit equivalent float. More...
 
uint64_t DoubleToBits (double Double)
 This function takes a double and returns the bit equivalent 64-bit integer. More...
 
uint32_t FloatToBits (float Float)
 This function takes a float and returns the bit equivalent 32-bit integer. More...
 
constexpr uint64_t MinAlign (uint64_t A, uint64_t B)
 A and B are either alignments or offsets. More...
 
uintptr_t alignAddr (const void *Addr, size_t Alignment)
 Aligns Addr to Alignment bytes, rounding up. More...
 
size_t alignmentAdjustment (const void *Ptr, size_t Alignment)
 Returns the necessary adjustment for aligning Ptr to Alignment bytes, rounding up. More...
 
uint64_t NextPowerOf2 (uint64_t A)
 Returns the next power of two (in 64-bits) that is strictly greater than A. More...
 
uint64_t PowerOf2Floor (uint64_t A)
 Returns the power of two which is less than or equal to the given value. More...
 
uint64_t PowerOf2Ceil (uint64_t A)
 Returns the power of two which is greater than or equal to the given value. More...
 
uint64_t alignTo (uint64_t Value, uint64_t Align, uint64_t Skew=0)
 Returns the next integer (mod 2**64) that is greater than or equal to Value and is a multiple of Align. More...
 
template<uint64_t Align>
constexpr uint64_t alignTo (uint64_t Value)
 Returns the next integer (mod 2**64) that is greater than or equal to Value and is a multiple of Align. More...
 
uint64_t divideCeil (uint64_t Numerator, uint64_t Denominator)
 Returns the integer ceil(Numerator / Denominator). More...
 
uint64_t alignDown (uint64_t Value, uint64_t Align, uint64_t Skew=0)
 Returns the largest uint64_t less than or equal to Value and is Skew mod Align. More...
 
uint64_t OffsetToAlignment (uint64_t Value, uint64_t Align)
 Returns the offset to the next integer (mod 2**64) that is greater than or equal to Value and is a multiple of Align. More...
 
template<unsigned B>
constexpr int32_t SignExtend32 (uint32_t X)
 Sign-extend the number in the bottom B bits of X to a 32-bit integer. More...
 
int32_t SignExtend32 (uint32_t X, unsigned B)
 Sign-extend the number in the bottom B bits of X to a 32-bit integer. More...
 
template<unsigned B>
constexpr int64_t SignExtend64 (uint64_t x)
 Sign-extend the number in the bottom B bits of X to a 64-bit integer. More...
 
int64_t SignExtend64 (uint64_t X, unsigned B)
 Sign-extend the number in the bottom B bits of X to a 64-bit integer. More...
 
template<typename T >
std::enable_if< std::is_unsigned< T >::value, T >::type AbsoluteDifference (T X, T Y)
 Subtract two unsigned integers, X and Y, of type T and return the absolute value of the result. More...
 
template<typename T >
std::enable_if< std::is_unsigned< T >::value, T >::type SaturatingAdd (T X, T Y, bool *ResultOverflowed=nullptr)
 Add two unsigned integers, X and Y, of type T. More...
 
template<typename T >
std::enable_if< std::is_unsigned< T >::value, T >::type SaturatingMultiply (T X, T Y, bool *ResultOverflowed=nullptr)
 Multiply two unsigned integers, X and Y, of type T. More...
 
template<typename T >
std::enable_if< std::is_unsigned< T >::value, T >::type SaturatingMultiplyAdd (T X, T Y, T A, bool *ResultOverflowed=nullptr)
 Multiply two unsigned integers, X and Y, and add the unsigned integer, A to the product. More...
 
bool operator== (const MD5::MD5Result &LHS, const MD5::MD5Result &RHS)
 
uint64_t MD5Hash (StringRef Str)
 Helper to compute and return lower 64 bits of the given string's MD5 hash. More...
 
LLVM_ATTRIBUTE_RETURNS_NONNULL void * safe_malloc (size_t Sz)
 
LLVM_ATTRIBUTE_RETURNS_NONNULL void * safe_calloc (size_t Count, size_t Sz)
 
LLVM_ATTRIBUTE_RETURNS_NONNULL void * safe_realloc (void *Ptr, size_t Sz)
 
size_t getDefaultPrecision (FloatStyle Style)
 
bool isPrefixedHexStyle (HexPrintStyle S)
 
void write_integer (raw_ostream &S, unsigned int N, size_t MinDigits, IntegerStyle Style)
 
void write_integer (raw_ostream &S, int N, size_t MinDigits, IntegerStyle Style)
 
void write_integer (raw_ostream &S, unsigned long N, size_t MinDigits, IntegerStyle Style)
 
void write_integer (raw_ostream &S, long N, size_t MinDigits, IntegerStyle Style)
 
void write_integer (raw_ostream &S, unsigned long long N, size_t MinDigits, IntegerStyle Style)
 
void write_integer (raw_ostream &S, long long N, size_t MinDigits, IntegerStyle Style)
 
void write_hex (raw_ostream &S, uint64_t N, HexPrintStyle Style, Optional< size_t > Width=None)
 
void write_double (raw_ostream &S, double D, FloatStyle Style, Optional< size_t > Precision=None)
 
static cl::opt< PluginLoader, false, cl::parser< std::string > > LoadOpt ("load", cl::ZeroOrMore, cl::value_desc("pluginfilename"), cl::desc("Load the specified plugin"))
 
void EnablePrettyStackTrace ()
 Enables dumping a "pretty" stack trace when the program crashes. More...
 
void EnablePrettyStackTraceOnSigInfoForThisThread (bool ShouldEnable=true)
 Enables (or disables) dumping a "pretty" stack trace when the user sends SIGINFO or SIGUSR1 to the current process. More...
 
const void * SavePrettyStackState ()
 Returns the topmost element of the "pretty" stack state. More...
 
void RestorePrettyStackState (const void *State)
 Restores the topmost element of the "pretty" stack state to State, which should come from a previous call to SavePrettyStackState(). More...
 
raw_ostreamoperator<< (raw_ostream &OS, const Printable &P)
 
std::error_code getRandomBytes (void *Buffer, size_t Size)
 
raw_ostreamouts ()
 This returns a reference to a raw_ostream for standard output. More...
 
raw_ostreamerrs ()
 This returns a reference to a raw_ostream for standard error. More...
 
raw_ostreamnulls ()
 This returns a reference to a raw_ostream which simply discards output. More...
 
void PrintRecyclerStats (size_t Size, size_t Align, size_t FreeListSize)
 PrintRecyclingAllocatorStats - Helper for RecyclingAllocator for printing statistics. More...
 
template<class T = void *>
bool shouldReverseIterate ()
 
template<class DigitsT >
ScaledNumber< DigitsT > operator<< (const ScaledNumber< DigitsT > &L, int16_t Shift)
 
template<class DigitsT >
ScaledNumber< DigitsT > operator>> (const ScaledNumber< DigitsT > &L, int16_t Shift)
 
template<class DigitsT >
raw_ostreamoperator<< (raw_ostream &OS, const ScaledNumber< DigitsT > &X)
 
raw_ostreamoperator<< (raw_ostream &OS, const HexNumber &Value)
 
const std::string to_hexString (uint64_t Value, bool UpperCase=true)
 
template<class T >
const std::string to_string (const T &Value)
 
template<>
void ScopedPrinter::printHex< support::ulittle16_t > (StringRef Label, support::ulittle16_t Value)
 
SMTSolverRef CreateZ3Solver ()
 Convenience method to create and Z3Solver object. More...
 
bool CheckBitcodeOutputToConsole (raw_ostream &stream_to_check, bool print_warning=true)
 Determine if the raw_ostream provided is connected to a terminal. More...
 
MCStreamer * createNullStreamer (MCContext &Ctx)
 
MCStreamer * createAsmStreamer (MCContext &Ctx, std::unique_ptr< formatted_raw_ostream > OS, bool isVerboseAsm, bool useDwarfDirectory, MCInstPrinter *InstPrint, std::unique_ptr< MCCodeEmitter > &&CE, std::unique_ptr< MCAsmBackend > &&TAB, bool ShowInst)
 Create a machine code streamer which will print out assembly for the native target, suitable for compiling with a native assembler. More...
 
MCStreamer * createELFStreamer (MCContext &Ctx, std::unique_ptr< MCAsmBackend > &&TAB, std::unique_ptr< MCObjectWriter > &&OW, std::unique_ptr< MCCodeEmitter > &&CE, bool RelaxAll)
 
MCStreamer * createMachOStreamer (MCContext &Ctx, std::unique_ptr< MCAsmBackend > &&TAB, std::unique_ptr< MCObjectWriter > &&OW, std::unique_ptr< MCCodeEmitter > &&CE, bool RelaxAll, bool DWARFMustBeAtTheEnd, bool LabelSections=false)
 
MCStreamer * createWasmStreamer (MCContext &Ctx, std::unique_ptr< MCAsmBackend > &&TAB, std::unique_ptr< MCObjectWriter > &&OW, std::unique_ptr< MCCodeEmitter > &&CE, bool RelaxAll)
 
MCStreamer * createXCOFFStreamer (MCContext &Ctx, std::unique_ptr< MCAsmBackend > &&TAB, std::unique_ptr< MCObjectWriter > &&OW, std::unique_ptr< MCCodeEmitter > &&CE, bool RelaxAll)
 
MCRelocationInfo * createMCRelocationInfo (const Triple &TT, MCContext &Ctx)
 
MCSymbolizer * createMCSymbolizer (const Triple &TT, LLVMOpInfoCallback GetOpInfo, LLVMSymbolLookupCallback SymbolLookUp, void *DisInfo, MCContext *Ctx, std::unique_ptr< MCRelocationInfo > &&RelInfo)
 
void InitializeAllTargetInfos ()
 InitializeAllTargetInfos - The main program should call this function if it wants access to all available targets that LLVM is configured to support, to make them available via the TargetRegistry. More...
 
void InitializeAllTargets ()
 InitializeAllTargets - The main program should call this function if it wants access to all available target machines that LLVM is configured to support, to make them available via the TargetRegistry. More...
 
void InitializeAllTargetMCs ()
 InitializeAllTargetMCs - The main program should call this function if it wants access to all available target MC that LLVM is configured to support, to make them available via the TargetRegistry. More...
 
void InitializeAllAsmPrinters ()
 InitializeAllAsmPrinters - The main program should call this function if it wants all asm printers that LLVM is configured to support, to make them available via the TargetRegistry. More...
 
void InitializeAllAsmParsers ()
 InitializeAllAsmParsers - The main program should call this function if it wants all asm parsers that LLVM is configured to support, to make them available via the TargetRegistry. More...
 
void InitializeAllDisassemblers ()
 InitializeAllDisassemblers - The main program should call this function if it wants all disassemblers that LLVM is configured to support, to make them available via the TargetRegistry. More...
 
bool InitializeNativeTarget ()
 InitializeNativeTarget - The main program should call this function to initialize the native target corresponding to the host. More...
 
bool InitializeNativeTargetAsmPrinter ()
 InitializeNativeTargetAsmPrinter - The main program should call this function to initialize the native target asm printer. More...
 
bool InitializeNativeTargetAsmParser ()
 InitializeNativeTargetAsmParser - The main program should call this function to initialize the native target asm parser. More...
 
bool InitializeNativeTargetDisassembler ()
 InitializeNativeTargetDisassembler - The main program should call this function to initialize the native target disassembler. More...
 
bool llvm_is_multithreaded ()
 Returns true if LLVM is compiled with support for multi-threading, and false otherwise. More...
 
void llvm_execute_on_thread (void(*UserFn)(void *), void *UserData, unsigned RequestedStackSize=0)
 llvm_execute_on_thread - Execute the given UserFn on a separate thread, passing it the provided UserData and waits for thread completion. More...
 
template<typename Function , typename... Args>
void call_once (once_flag &flag, Function &&F, Args &&... ArgList)
 Execute the function specified as a parameter once. More...
 
unsigned heavyweight_hardware_concurrency ()
 Get the amount of currency to use for tasks requiring significant memory or other resources. More...
 
unsigned hardware_concurrency ()
 Get the number of threads that the current program can execute concurrently. More...
 
uint64_t get_threadid ()
 Return the current thread id, as used in various OS system calls. More...
 
uint32_t get_max_thread_name_length ()
 Get the maximum length of a thread name on this platform. More...
 
void set_thread_name (const Twine &Name)
 Set the name of the current thread. More...
 
void get_thread_name (SmallVectorImpl< char > &Name)
 Get the name of the current thread. More...
 
SetThreadPriorityResult set_thread_priority (ThreadPriority Priority)
 
void timeTraceProfilerInitialize ()
 Initialize the time trace profiler. More...
 
void timeTraceProfilerCleanup ()
 Cleanup the time trace profiler, if it was initialized. More...
 
bool timeTraceProfilerEnabled ()
 Is the time trace profiler enabled, i.e. initialized? More...
 
void timeTraceProfilerWrite (raw_pwrite_stream &OS)
 Write profiling data to output file. More...
 
void timeTraceProfilerBegin (StringRef Name, StringRef Detail)
 Manually begin a time section, with the given Name and Detail. More...
 
void timeTraceProfilerBegin (StringRef Name, llvm::function_ref< std::string()> Detail)
 
void timeTraceProfilerEnd ()
 Manually end the last time section. More...
 
template<typename DesiredTypeName >
StringRef getTypeName ()
 We provide a function which tries to compute the (demangled) name of a type statically. More...
 
raw_ostreamoperator<< (raw_ostream &Out, const VersionTuple &V)
 Print a version number. More...
 
std::error_code mapWindowsError (unsigned EV)
 
uint64_t xxHash64 (llvm::StringRef Data)
 
uint64_t xxHash64 (llvm::ArrayRef< uint8_t > Data)
 
FunctionPass * createAggressiveInstCombinerPass ()
 
void addCoroutinePassesToExtensionPoints (PassManagerBuilder &Builder)
 Add all coroutine passes to appropriate extension points. More...
 
PasscreateCoroEarlyPass ()
 Lower coroutine intrinsics that are not needed by later passes. More...
 
PasscreateCoroSplitPass ()
 Split up coroutines into multiple functions driving their state machines. More...
 
PasscreateCoroElidePass ()
 Analyze coroutines use sites, devirtualize resume/destroy calls and elide heap allocation for coroutine frame where possible. More...
 
PasscreateCoroCleanupPass ()
 Lower all remaining coroutine intrinsics. More...
 
FunctionPass * createInstructionCombiningPass (bool ExpensiveCombines=true)
 
BasicBlock::iterator PrepareToSplitEntryBlock (BasicBlock &BB, BasicBlock::iterator IP)
 Instrumentation passes often insert conditional checks into entry blocks. More...
 
GlobalVariablecreatePrivateGlobalForString (Module &M, StringRef Str, bool AllowMerging, const char *NamePrefix="")
 
ComdatGetOrCreateFunctionComdat (Function &F, Triple &T, const std::string &ModuleId)
 
ModulePasscreateGCOVProfilerPass (const GCOVOptions &Options=GCOVOptions::getDefault())
 
ModulePasscreatePGOInstrumentationGenLegacyPass (bool IsCS=false)
 
ModulePasscreatePGOInstrumentationUseLegacyPass (StringRef Filename=StringRef(""), bool IsCS=false)
 
ModulePasscreatePGOInstrumentationGenCreateVarLegacyPass (StringRef CSInstrName=StringRef(""))
 
ModulePasscreatePGOIndirectCallPromotionLegacyPass (bool InLTO=false, bool SamplePGO=false)
 
FunctionPass * createPGOMemOPSizeOptLegacyPass ()
 
ModulePasscreateInstrProfilingLegacyPass (const InstrProfOptions &Options=InstrProfOptions(), bool IsCS=false)
 Insert frontend instrumentation based profiling. Parameter IsCS indicates if. More...
 
ModulePasscreateInstrOrderFilePass ()
 
ModulePasscreateDataFlowSanitizerPass (const std::vector< std::string > &ABIListFiles=std::vector< std::string >(), void *(*getArgTLS)()=nullptr, void *(*getRetValTLS)()=nullptr)
 
ModulePasscreateSanitizerCoverageModulePass (const SanitizerCoverageOptions &Options=SanitizerCoverageOptions())
 
static uint64_t calculateCountScale (uint64_t MaxCount)
 Calculate what to divide by to scale counts. More...
 
static uint32_t scaleBranchCount (uint64_t Count, uint64_t Scale)
 Scale an individual branch count. More...
 
FunctionPass * createAddressSanitizerFunctionPass (bool CompileKernel=false, bool Recover=false, bool UseAfterScope=false)
 
ModulePasscreateModuleAddressSanitizerLegacyPassPass (bool CompileKernel=false, bool Recover=false, bool UseGlobalsGC=true, bool UseOdrIndicator=true)
 
FunctionPass * createBoundsCheckingLegacyPass ()
 Legacy pass creation function for the above pass. More...
 
FunctionPass * createHWAddressSanitizerLegacyPassPass (bool CompileKernel=false, bool Recover=false)
 
FunctionPass * createMemorySanitizerLegacyPassPass (MemorySanitizerOptions Options={})
 
void setProfMetadata (Module *M, Instruction *TI, ArrayRef< uint64_t > EdgeCounts, uint64_t MaxCount)
 
void setIrrLoopHeaderMetadata (Module *M, Instruction *TI, uint64_t Count)
 
FunctionPass * createThreadSanitizerLegacyPassPass ()
 
ModulePasscreateStripSymbolsPass (bool OnlyDebugInfo=false)
 
ModulePasscreateStripNonDebugSymbolsPass ()
 
ModulePasscreateStripDebugDeclarePass ()
 
ModulePasscreateStripDeadDebugInfoPass ()
 
ModulePasscreateConstantMergePass ()
 createConstantMergePass - This function returns a new pass that merges duplicate global constants together into a single constant that is shared. More...
 
ModulePasscreateGlobalOptimizerPass ()
 createGlobalOptimizerPass - This function returns a new pass that optimizes non-address taken internal globals. More...
 
ModulePasscreateGlobalDCEPass ()
 createGlobalDCEPass - This transform is designed to eliminate unreachable internal globals (functions or global variables) More...
 
ModulePasscreateEliminateAvailableExternallyPass ()
 This transform is designed to eliminate available external globals (functions or global variables) More...
 
ModulePasscreateGVExtractionPass (std::vector< GlobalValue * > &GVs, bool deleteFn=false)
 createGVExtractionPass - If deleteFn is true, this pass deletes the specified global values. More...
 
PasscreateFunctionImportPass ()
 This pass performs iterative function importing from other modules. More...
 
PasscreateFunctionInliningPass ()
 createFunctionInliningPass - Return a new pass object that uses a heuristic to inline direct function calls to small functions. More...
 
PasscreateFunctionInliningPass (int Threshold)
 
PasscreateFunctionInliningPass (unsigned OptLevel, unsigned SizeOptLevel, bool DisableInlineHotCallSite)
 
PasscreateFunctionInliningPass (InlineParams &Params)
 
PasscreatePruneEHPass ()
 createPruneEHPass - Return a new pass object which transforms invoke instructions into calls, if the callee can not unwind the stack. More...
 
ModulePasscreateInternalizePass (std::function< bool(const GlobalValue &)> MustPreserveGV)
 createInternalizePass - This pass loops over all of the functions in the input module, internalizing all globals (functions and variables) it can. More...
 
ModulePasscreateInternalizePass ()
 createInternalizePass - Same as above, but with an empty exportList. More...
 
ModulePasscreateDeadArgEliminationPass ()
 createDeadArgEliminationPass - This pass removes arguments from functions which are not used by the body of the function. More...
 
ModulePasscreateDeadArgHackingPass ()
 DeadArgHacking pass - Same as DAE, but delete arguments of external functions as well. More...
 
PasscreateArgumentPromotionPass (unsigned maxElements=3)
 createArgumentPromotionPass - This pass promotes "by reference" arguments to be passed by value if the number of elements passed is smaller or equal to maxElements (maxElements == 0 means always promote). More...
 
ModulePasscreateIPConstantPropagationPass ()
 createIPConstantPropagationPass - This pass propagates constants from call sites into the bodies of functions. More...
 
ModulePasscreateIPSCCPPass ()
 createIPSCCPPass - This pass propagates constants from call sites into the bodies of functions, and keeps track of whether basic blocks are executable in the process. More...
 
PasscreateLoopExtractorPass ()
 createLoopExtractorPass - This pass extracts all natural loops from the program into a function if it can. More...
 
PasscreateSingleLoopExtractorPass ()
 createSingleLoopExtractorPass - This pass extracts one natural loop from the program into a function if it can. More...
 
ModulePasscreateBlockExtractorPass ()
 createBlockExtractorPass - This pass extracts all the specified blocks from the functions in the module. More...
 
ModulePasscreateBlockExtractorPass (const SmallVectorImpl< BasicBlock * > &BlocksToExtract, bool EraseFunctions)
 
ModulePasscreateBlockExtractorPass (const SmallVectorImpl< SmallVector< BasicBlock *, 16 > > &GroupsOfBlocksToExtract, bool EraseFunctions)
 
ModulePasscreateStripDeadPrototypesPass ()
 createStripDeadPrototypesPass - This pass removes any function declarations (prototypes) that are not used. More...
 
PasscreateReversePostOrderFunctionAttrsPass ()
 createReversePostOrderFunctionAttrsPass - This pass walks SCCs of the call graph in RPO to deduce and propagate function attributes. More...
 
ModulePasscreateMergeFunctionsPass ()
 createMergeFunctionsPass - This pass discovers identical functions and collapses them. More...
 
ModulePasscreateHotColdSplittingPass ()
 createHotColdSplittingPass - This pass outlines cold blocks into a separate function(s). More...
 
ModulePasscreatePartialInliningPass ()
 createPartialInliningPass - This pass inlines parts of functions. More...
 
ModulePasscreateBarrierNoopPass ()
 createBarrierNoopPass - This pass is purely a module pass barrier in a pass manager. More...
 
ModulePasscreateCalledValuePropagationPass ()
 createCalledValuePropagationPass - Attach metadata to indirct call sites indicating the set of functions they may target at run-time. More...
 
ModulePasscreateLowerTypeTestsPass (ModuleSummaryIndex *ExportSummary, const ModuleSummaryIndex *ImportSummary)
 This pass lowers type metadata and the llvm.type.test intrinsic to bitsets. More...
 
ModulePasscreateCrossDSOCFIPass ()
 This pass export CFI checks for use by external modules. More...
 
ModulePasscreateWholeProgramDevirtPass (ModuleSummaryIndex *ExportSummary, const ModuleSummaryIndex *ImportSummary)
 This pass implements whole-program devirtualization using type metadata. More...
 
ModulePasscreateGlobalSplitPass ()
 This pass splits globals into pieces for the benefit of whole-program devirtualization and control-flow integrity. More...
 
ModulePasscreateSampleProfileLoaderPass ()
 
ModulePasscreateSampleProfileLoaderPass (StringRef Name)
 
ModulePasscreateWriteThinLTOBitcodePass (raw_ostream &Str, raw_ostream *ThinLinkOS=nullptr)
 Write ThinLTO-ready bitcode to Str. More...
 
PasscreateAlwaysInlinerLegacyPass (bool InsertLifetime=true)
 Create a legacy pass manager instance of a pass to inline and remove functions marked as "always_inline". More...
 
ChangeStatus operator| (ChangeStatus l, ChangeStatus r)
 Logic operators for the change status enum class. More...
 
ChangeStatus operator& (ChangeStatus l, ChangeStatus r)
 
raw_ostreamoperator<< (raw_ostream &OS, const AbstractAttribute &AA)
 Forward declarations of output streams for debug purposes. More...
 
raw_ostreamoperator<< (raw_ostream &OS, ChangeStatus S)
 Helpers to ease debugging through output streams and print calls. More...
 
raw_ostreamoperator<< (raw_ostream &OS, AbstractAttribute::ManifestPosition)
 
raw_ostreamoperator<< (raw_ostream &OS, const AbstractState &State)
 
PasscreateAttributorLegacyPass ()
 
PasscreateForceFunctionAttrsLegacyPass ()
 Create a legacy pass manager instance of a pass to force function attrs. More...
 
MemoryAccessKind computeFunctionBodyMemoryAccess (Function &F, AAResults &AAR)
 Returns the memory access properties of this copy of the function. More...
 
PasscreatePostOrderFunctionAttrsLegacyPass ()
 Create a legacy pass manager instance of a pass to compute function attrs in post-order. More...
 
void ComputeCrossModuleImport (const ModuleSummaryIndex &Index, const StringMap< GVSummaryMapTy > &ModuleToDefinedGVSummaries, StringMap< FunctionImporter::ImportMapTy > &ImportLists, StringMap< FunctionImporter::ExportSetTy > &ExportLists)
 Compute all the imports and exports for every module in the Index. More...
 
void ComputeCrossModuleImportForModule (StringRef ModulePath, const ModuleSummaryIndex &Index, FunctionImporter::ImportMapTy &ImportList)
 Compute all the imports for the given module using the Index. More...
 
void ComputeCrossModuleImportForModuleFromIndex (StringRef ModulePath, const ModuleSummaryIndex &Index, FunctionImporter::ImportMapTy &ImportList)
 Mark all external summaries in Index for import into the given module. More...
 
void computeDeadSymbols (ModuleSummaryIndex &Index, const DenseSet< GlobalValue::GUID > &GUIDPreservedSymbols, function_ref< PrevailingType(GlobalValue::GUID)> isPrevailing)
 Compute all the symbols that are "dead": i.e these that can't be reached in the graph from any of the given symbols listed in GUIDPreservedSymbols. More...
 
void computeDeadSymbolsWithConstProp (ModuleSummaryIndex &Index, const DenseSet< GlobalValue::GUID > &GUIDPreservedSymbols, function_ref< PrevailingType(GlobalValue::GUID)> isPrevailing, bool ImportEnabled)
 Compute dead symbols and run constant propagation in combined index after that. More...
 
bool convertToDeclaration (GlobalValue &GV)
 Converts value GV to declaration, or replaces with a declaration if it is an alias. More...
 
void gatherImportedSummariesForModule (StringRef ModulePath, const StringMap< GVSummaryMapTy > &ModuleToDefinedGVSummaries, const FunctionImporter::ImportMapTy &ImportList, std::map< std::string, GVSummaryMapTy > &ModuleToSummariesForIndex)
 Compute the set of summaries needed for a ThinLTO backend compilation of ModulePath. More...
 
std::error_code EmitImportsFiles (StringRef ModulePath, StringRef OutputFilename, const std::map< std::string, GVSummaryMapTy > &ModuleToSummariesForIndex)
 Emit into OutputFilename the files module ModulePath will import from. More...
 
void thinLTOResolvePrevailingInModule (Module &TheModule, const GVSummaryMapTy &DefinedGlobals)
 Resolve prevailing symbol linkages in TheModule based on the information recorded in the summaries during global summary-based analysis. More...
 
void thinLTOInternalizeModule (Module &TheModule, const GVSummaryMapTy &DefinedGlobals)
 Internalize TheModule based on the information recorded in the summaries during global summary-based analysis. More...
 
PasscreateInferFunctionAttrsLegacyPass ()
 Create a legacy pass manager instance of a pass to infer function attributes. More...
 
bool internalizeModule (Module &TheModule, std::function< bool(const GlobalValue &)> MustPreserveGV, CallGraph *CG=nullptr)
 Helper function to internalize functions and variables in a Module. More...
 
PasscreateObjCARCAPElimPass ()
 
PasscreateObjCARCExpandPass ()
 
PasscreateObjCARCContractPass ()
 
PasscreateObjCARCOptPass ()
 
FunctionPass * createConstantPropagationPass ()
 
FunctionPass * createAlignmentFromAssumptionsPass ()
 
FunctionPass * createSCCPPass ()
 
PasscreateDeadInstEliminationPass ()
 
FunctionPass * createDeadCodeEliminationPass ()
 
FunctionPass * createDeadStoreEliminationPass ()
 
FunctionPass * createCallSiteSplittingPass ()
 
FunctionPass * createAggressiveDCEPass ()
 
FunctionPass * createGuardWideningPass ()
 
PasscreateLoopGuardWideningPass ()
 
FunctionPass * createBitTrackingDCEPass ()
 
FunctionPass * createSROAPass ()
 
PasscreateInductiveRangeCheckEliminationPass ()
 
PasscreateIndVarSimplifyPass ()
 
PasscreateLICMPass ()
 
PasscreateLICMPass (unsigned LicmMssaOptCap, unsigned LicmMssaNoAccForPromotionCap)
 
PasscreateLoopSinkPass ()
 
PasscreateLoopPredicationPass ()
 
PasscreateLoopInterchangePass ()
 
PasscreateLoopStrengthReducePass ()
 
PasscreateLoopUnswitchPass (bool OptimizeForSize=false, bool hasBranchDivergence=false)
 
PasscreateLoopInstSimplifyPass ()
 
PasscreateLoopUnrollPass (int OptLevel=2, bool OnlyWhenForced=false, bool ForgetAllSCEV=false, int Threshold=-1, int Count=-1, int AllowPartial=-1, int Runtime=-1, int UpperBound=-1, int AllowPeeling=-1)
 
PasscreateSimpleLoopUnrollPass (int OptLevel=2, bool OnlyWhenForced=false, bool ForgetAllSCEV=false)
 
PasscreateLoopUnrollAndJamPass (int OptLevel=2)
 
PasscreateLoopRerollPass ()
 
PasscreateLoopRotatePass (int MaxHeaderSize=-1)
 
PasscreateLoopIdiomPass ()
 
PasscreateLoopVersioningLICMPass ()
 
FunctionPass * createDemoteRegisterToMemoryPass ()
 
FunctionPass * createReassociatePass ()
 
FunctionPass * createJumpThreadingPass (int Threshold=-1)
 
FunctionPass * createCFGSimplificationPass (unsigned Threshold=1, bool ForwardSwitchCond=false, bool ConvertSwitch=false, bool KeepLoops=true, bool SinkCommon=false, std::function< bool(const Function &)> Ftor=nullptr)
 
FunctionPass * createFlattenCFGPass ()
 
PasscreateStructurizeCFGPass (bool SkipUniformRegions=false)
 When SkipUniformRegions is true the structizer will not structurize regions that only contain uniform branches. More...
 
FunctionPass * createTailCallEliminationPass ()
 
FunctionPass * createEarlyCSEPass (bool UseMemorySSA=false)
 
FunctionPass * createGVNHoistPass ()
 
FunctionPass * createGVNSinkPass ()
 
FunctionPass * createMergedLoadStoreMotionPass ()
 createMergedLoadStoreMotionPass - The public interface to this file. More...
 
FunctionPass * createNewGVNPass ()
 
FunctionPass * createDivRemPairsPass ()
 
FunctionPass * createMemCpyOptPass ()
 The public interface to this file... More...
 
PasscreateLoopDeletionPass ()
 
FunctionPass * createConstantHoistingPass ()
 
FunctionPass * createSinkingPass ()
 
PasscreateLowerAtomicPass ()
 
PasscreateLowerGuardIntrinsicPass ()
 
PasscreateLowerWidenableConditionPass ()
 
PasscreateMergeICmpsLegacyPass ()
 
PasscreateCorrelatedValuePropagationPass ()
 
FunctionPass * createInferAddressSpacesPass (unsigned AddressSpace=~0u)
 
FunctionPass * createLowerExpectIntrinsicPass ()
 
FunctionPass * createPartiallyInlineLibCallsPass ()
 
FunctionPass * createSeparateConstOffsetFromGEPPass (bool LowerGEP=false)
 
FunctionPass * createSpeculativeExecutionPass ()
 
FunctionPass * createSpeculativeExecutionIfHasBranchDivergencePass ()
 
FunctionPass * createStraightLineStrengthReducePass ()
 
FunctionPass * createPlaceSafepointsPass ()
 
ModulePasscreateRewriteStatepointsForGCLegacyPass ()
 
FunctionPass * createFloat2IntPass ()
 
FunctionPass * createNaryReassociatePass ()
 
FunctionPass * createLoopDistributePass ()
 
FunctionPass * createLoopFusePass ()
 
FunctionPass * createLoopLoadEliminationPass ()
 
FunctionPass * createLoopVersioningPass ()
 
FunctionPass * createLoopDataPrefetchPass ()
 
ModulePasscreateNameAnonGlobalPass ()
 ===------------------------------------------------------------------—===// More...
 
ModulePasscreateCanonicalizeAliasesPass ()
 
FunctionPass * createLibCallsShrinkWrapPass ()
 
PasscreateLoopSimplifyCFGPass ()
 
PasscreateWarnMissedTransformationsPass ()
 
FunctionPass * createGVNPass (bool NoLoads=false)
 Create a legacy GVN pass. More...
 
FunctionPass * createInstSimplifyLegacyPass ()
 Create a legacy pass that does instruction simplification on each instruction in a function. More...
 
template<typename LoopPassT >
FunctionToLoopPassAdaptor< LoopPassT > createFunctionToLoopPassAdaptor (LoopPassT Pass, bool DebugLogging=false)
 A function to deduce a loop pass type and wrap it in the templated adaptor. More...
 
FunctionPass * createScalarizerPass ()
 Create a legacy pass manager instance of the Scalarizer pass. More...
 
bool runIPSCCP (Module &M, const DataLayout &DL, const TargetLibraryInfo *TLI, function_ref< AnalysisResultsForFn(Function &)> getAnalysis)
 
PasscreateSimpleLoopUnswitchLegacyPass (bool NonTrivial=false)
 Create the legacy pass object for the simple loop unswitcher. More...
 
void initializeWarnMissedTransformationsLegacyPass (PassRegistry &)
 
ModulePasscreateMetaRenamerPass ()
 
FunctionPass * createLowerInvokePass ()
 
FunctionPass * createInstructionNamerPass ()
 
FunctionPass * createLowerSwitchPass ()
 
FunctionPass * createEntryExitInstrumenterPass ()
 
FunctionPass * createPostInlineEntryExitInstrumenterPass ()
 
FunctionPass * createBreakCriticalEdgesPass ()
 
PasscreateLCSSAPass ()
 
FunctionPass * createAddDiscriminatorsPass ()
 
FunctionPass * createPromoteMemoryToRegisterPass ()
 
PasscreateLoopSimplifyPass ()
 
ModulePasscreateStripNonLineTableDebugInfoPass ()
 This function returns a new pass that downgrades the debug info in the module to line tables only. More...
 
FunctionPass * createControlHeightReductionLegacyPass ()
 
ASanStackFrameLayout ComputeASanStackFrameLayout (SmallVectorImpl< ASanStackVariableDescription > &Vars, size_t Granularity, size_t MinHeaderSize)
 
SmallString< 64 > ComputeASanStackFrameDescription (const SmallVectorImpl< ASanStackVariableDescription > &Vars)
 
SmallVector< uint8_t, 64 > GetShadowBytes (const SmallVectorImpl< ASanStackVariableDescription > &Vars, const ASanStackFrameLayout &Layout)
 
SmallVector< uint8_t, 64 > GetShadowBytesAfterScope (const SmallVectorImpl< ASanStackVariableDescription > &Vars, const ASanStackFrameLayout &Layout)
 
void DetatchDeadBlocks (ArrayRef< BasicBlock * > BBs, SmallVectorImpl< DominatorTree::UpdateType > *Updates, bool KeepOneInputPHIs=false)
 Replace contents of every block in BBs with single unreachable instruction. More...
 
void DeleteDeadBlock (BasicBlock *BB, DomTreeUpdater *DTU=nullptr, bool KeepOneInputPHIs=false)
 Delete the specified block, which must have no predecessors. More...
 
void DeleteDeadBlocks (ArrayRef< BasicBlock * > BBs, DomTreeUpdater *DTU=nullptr, bool KeepOneInputPHIs=false)
 Delete the specified blocks from BB. More...
 
bool EliminateUnreachableBlocks (Function &F, DomTreeUpdater *DTU=nullptr, bool KeepOneInputPHIs=false)
 Delete all basic blocks from F that are not reachable from its entry node. More...
 
void FoldSingleEntryPHINodes (BasicBlock *BB, MemoryDependenceResults *MemDep=nullptr)
 We know that BB has one predecessor. More...
 
bool DeleteDeadPHIs (BasicBlock *BB, const TargetLibraryInfo *TLI=nullptr)
 Examine each PHI in the given block and delete it if it is dead. More...
 
bool MergeBlockIntoPredecessor (BasicBlock *BB, DomTreeUpdater *DTU=nullptr, LoopInfo *LI=nullptr, MemorySSAUpdater *MSSAU=nullptr, MemoryDependenceResults *MemDep=nullptr)
 Attempts to merge a block into its predecessor, if possible. More...
 
void ReplaceInstWithValue (BasicBlock::InstListType &BIL, BasicBlock::iterator &BI, Value *V)
 Replace all uses of an instruction (specified by BI) with a value, then remove and delete the original instruction. More...
 
void ReplaceInstWithInst (BasicBlock::InstListType &BIL, BasicBlock::iterator &BI, Instruction *I)
 Replace the instruction specified by BI with the instruction specified by I. More...
 
void ReplaceInstWithInst (Instruction *From, Instruction *To)
 Replace the instruction specified by From with the instruction specified by To. More...
 
BasicBlockSplitCriticalEdge (Instruction *TI, unsigned SuccNum, const CriticalEdgeSplittingOptions &Options=CriticalEdgeSplittingOptions())
 If this edge is a critical edge, insert a new node to split the critical edge. More...
 
BasicBlockSplitCriticalEdge (BasicBlock *BB, succ_iterator SI, const CriticalEdgeSplittingOptions &Options=CriticalEdgeSplittingOptions())
 
bool SplitCriticalEdge (BasicBlock *Succ, pred_iterator PI, const CriticalEdgeSplittingOptions &Options=CriticalEdgeSplittingOptions())
 If the edge from *PI to BB is not critical, return false. More...
 
BasicBlockSplitCriticalEdge (BasicBlock *Src, BasicBlock *Dst, const CriticalEdgeSplittingOptions &Options=CriticalEdgeSplittingOptions())
 If an edge from Src to Dst is critical, split the edge and return true, otherwise return false. More...
 
unsigned SplitAllCriticalEdges (Function &F, const CriticalEdgeSplittingOptions &Options=CriticalEdgeSplittingOptions())
 Loop over all of the edges in the CFG, breaking critical edges as they are found. More...
 
BasicBlockSplitEdge (BasicBlock *From, BasicBlock *To, DominatorTree *DT=nullptr, LoopInfo *LI=nullptr, MemorySSAUpdater *MSSAU=nullptr)
 Split the edge connecting specified block. More...
 
BasicBlockSplitBlock (BasicBlock *Old, Instruction *SplitPt, DominatorTree *DT=nullptr, LoopInfo *LI=nullptr, MemorySSAUpdater *MSSAU=nullptr)
 Split the specified block at the specified instruction - everything before SplitPt stays in Old and everything starting with SplitPt moves to a new block. More...
 
BasicBlockSplitBlockPredecessors (BasicBlock *BB, ArrayRef< BasicBlock * > Preds, const char *Suffix, DominatorTree *DT=nullptr, LoopInfo *LI=nullptr, MemorySSAUpdater *MSSAU=nullptr, bool PreserveLCSSA=false)
 This method introduces at least one new basic block into the function and moves some of the predecessors of BB to be predecessors of the new block. More...
 
void SplitLandingPadPredecessors (BasicBlock *OrigBB, ArrayRef< BasicBlock * > Preds, const char *Suffix, const char *Suffix2, SmallVectorImpl< BasicBlock * > &NewBBs, DominatorTree *DT=nullptr, LoopInfo *LI=nullptr, MemorySSAUpdater *MSSAU=nullptr, bool PreserveLCSSA=false)
 This method transforms the landing pad, OrigBB, by introducing two new basic blocks into the function. More...
 
ReturnInstFoldReturnIntoUncondBranch (ReturnInst *RI, BasicBlock *BB, BasicBlock *Pred, DomTreeUpdater *DTU=nullptr)
 This method duplicates the specified return instruction into a predecessor which ends in an unconditional branch. More...
 
InstructionSplitBlockAndInsertIfThen (Value *Cond, Instruction *SplitBefore, bool Unreachable, MDNode *BranchWeights=nullptr, DominatorTree *DT=nullptr, LoopInfo *LI=nullptr, BasicBlock *ThenBlock=nullptr)
 Split the containing block at the specified instruction - everything before SplitBefore stays in the old basic block, and the rest of the instructions in the BB are moved to a new block. More...
 
void SplitBlockAndInsertIfThenElse (Value *Cond, Instruction *SplitBefore, Instruction **ThenTerm, Instruction **ElseTerm, MDNode *BranchWeights=nullptr)
 SplitBlockAndInsertIfThenElse is similar to SplitBlockAndInsertIfThen, but also creates the ElseBlock. More...
 
ValueGetIfCondition (BasicBlock *BB, BasicBlock *&IfTrue, BasicBlock *&IfFalse)
 Check whether BB is the merge point of a if-region. More...
 
bool SplitIndirectBrCriticalEdges (Function &F, BranchProbabilityInfo *BPI=nullptr, BlockFrequencyInfo *BFI=nullptr)
 
bool inferLibFuncAttributes (Function &F, const TargetLibraryInfo &TLI)
 Analyze the name and prototype of the given function and set any applicable attributes. More...
 
bool inferLibFuncAttributes (Module *M, StringRef Name, const TargetLibraryInfo &TLI)
 
bool hasUnaryFloatFn (const TargetLibraryInfo *TLI, Type *Ty, LibFunc DoubleFn, LibFunc FloatFn, LibFunc LongDoubleFn)
 Check whether the overloaded unary floating point function corresponding to Ty is available. More...
 
StringRef getUnaryFloatFn (const TargetLibraryInfo *TLI, Type *Ty, LibFunc DoubleFn, LibFunc FloatFn, LibFunc LongDoubleFn)
 Get the name of the overloaded unary floating point function corresponding to Ty. More...
 
ValuecastToCStr (Value *V, IRBuilder<> &B)
 Return V if it is an i8*, otherwise cast it to i8*. More...
 
ValueemitStrLen (Value *Ptr, IRBuilder<> &B, const DataLayout &DL, const TargetLibraryInfo *TLI)
 Emit a call to the strlen function to the builder, for the specified pointer. More...
 
ValueemitStrNLen (Value *Ptr, Value *MaxLen, IRBuilder<> &B, const DataLayout &DL, const TargetLibraryInfo *TLI)
 Emit a call to the strnlen function to the builder, for the specified pointer. More...
 
ValueemitStrChr (Value *Ptr, char C, IRBuilder<> &B, const TargetLibraryInfo *TLI)
 Emit a call to the strchr function to the builder, for the specified pointer and character. More...
 
ValueemitStrNCmp (Value *Ptr1, Value *Ptr2, Value *Len, IRBuilder<> &B, const DataLayout &DL, const TargetLibraryInfo *TLI)
 Emit a call to the strncmp function to the builder. More...
 
ValueemitStrCpy (Value *Dst, Value *Src, IRBuilder<> &B, const TargetLibraryInfo *TLI)
 Emit a call to the strcpy function to the builder, for the specified pointer arguments. More...
 
ValueemitStpCpy (Value *Dst, Value *Src, IRBuilder<> &B, const TargetLibraryInfo *TLI)
 Emit a call to the stpcpy function to the builder, for the specified pointer arguments. More...
 
ValueemitStrNCpy (Value *Dst, Value *Src, Value *Len, IRBuilder<> &B, const TargetLibraryInfo *TLI)
 Emit a call to the strncpy function to the builder, for the specified pointer arguments and length. More...
 
ValueemitStpNCpy (Value *Dst, Value *Src, Value *Len, IRBuilder<> &B, const TargetLibraryInfo *TLI)
 Emit a call to the stpncpy function to the builder, for the specified pointer arguments and length. More...
 
ValueemitMemCpyChk (Value *Dst, Value *Src, Value *Len, Value *ObjSize, IRBuilder<> &B, const DataLayout &DL, const TargetLibraryInfo *TLI)
 Emit a call to the __memcpy_chk function to the builder. More...
 
ValueemitMemChr (Value *Ptr, Value *Val, Value *Len, IRBuilder<> &B, const DataLayout &DL, const TargetLibraryInfo *TLI)
 Emit a call to the memchr function. More...
 
ValueemitMemCmp (Value *Ptr1, Value *Ptr2, Value *Len, IRBuilder<> &B, const DataLayout &DL, const TargetLibraryInfo *TLI)
 Emit a call to the memcmp function. More...
 
ValueemitBCmp (Value *Ptr1, Value *Ptr2, Value *Len, IRBuilder<> &B, const DataLayout &DL, const TargetLibraryInfo *TLI)
 Emit a call to the bcmp function. More...
 
ValueemitMemCCpy (Value *Ptr1, Value *Ptr2, Value *Val, Value *Len, IRBuilder<> &B, const TargetLibraryInfo *TLI)
 Emit a call to the memccpy function. More...
 
ValueemitSNPrintf (Value *Dest, Value *Size, Value *Fmt, ArrayRef< Value * > Args, IRBuilder<> &B, const TargetLibraryInfo *TLI)
 Emit a call to the snprintf function. More...
 
ValueemitSPrintf (Value *Dest, Value *Fmt, ArrayRef< Value * > VariadicArgs, IRBuilder<> &B, const TargetLibraryInfo *TLI)
 Emit a call to the sprintf function. More...
 
ValueemitStrCat (Value *Dest, Value *Src, IRBuilder<> &B, const TargetLibraryInfo *TLI)
 Emit a call to the strcat function. More...
 
ValueemitStrLCpy (Value *Dest, Value *Src, Value *Size, IRBuilder<> &B, const TargetLibraryInfo *TLI)
 Emit a call to the strlcpy function. More...
 
ValueemitStrLCat (Value *Dest, Value *Src, Value *Size, IRBuilder<> &B, const TargetLibraryInfo *TLI)
 Emit a call to the strlcat function. More...
 
ValueemitStrNCat (Value *Dest, Value *Src, Value *Size, IRBuilder<> &B, const TargetLibraryInfo *TLI)
 Emit a call to the strncat function. More...
 
ValueemitVSNPrintf (Value *Dest, Value *Size, Value *Fmt, Value *VAList, IRBuilder<> &B, const TargetLibraryInfo *TLI)
 Emit a call to the vsnprintf function. More...
 
ValueemitVSPrintf (Value *Dest, Value *Fmt, Value *VAList, IRBuilder<> &B, const TargetLibraryInfo *TLI)
 Emit a call to the vsprintf function. More...
 
ValueemitUnaryFloatFnCall (Value *Op, StringRef Name, IRBuilder<> &B, const AttributeList &Attrs)
 Emit a call to the unary function named 'Name' (e.g. More...
 
ValueemitUnaryFloatFnCall (Value *Op, const TargetLibraryInfo *TLI, LibFunc DoubleFn, LibFunc FloatFn, LibFunc LongDoubleFn, IRBuilder<> &B, const AttributeList &Attrs)
 Emit a call to the unary function DoubleFn, FloatFn or LongDoubleFn, depending of the type of Op. More...
 
ValueemitBinaryFloatFnCall (Value *Op1, Value *Op2, StringRef Name, IRBuilder<> &B, const AttributeList &Attrs)
 Emit a call to the binary function named 'Name' (e.g. More...
 
ValueemitPutChar (Value *Char, IRBuilder<> &B, const TargetLibraryInfo *TLI)
 Emit a call to the putchar function. This assumes that Char is an integer. More...
 
ValueemitPutS (Value *Str, IRBuilder<> &B, const TargetLibraryInfo *TLI)
 Emit a call to the puts function. This assumes that Str is some pointer. More...
 
ValueemitFPutC (Value *Char, Value *File, IRBuilder<> &B, const TargetLibraryInfo *TLI)
 Emit a call to the fputc function. More...
 
ValueemitFPutCUnlocked (Value *Char, Value *File, IRBuilder<> &B, const TargetLibraryInfo *TLI)
 Emit a call to the fputc_unlocked function. More...
 
ValueemitFPutS (Value *Str, Value *File, IRBuilder<> &B, const TargetLibraryInfo *TLI)
 Emit a call to the fputs function. More...
 
ValueemitFPutSUnlocked (Value *Str, Value *File, IRBuilder<> &B, const TargetLibraryInfo *TLI)
 Emit a call to the fputs_unlocked function. More...
 
ValueemitFWrite (Value *Ptr, Value *Size, Value *File, IRBuilder<> &B, const DataLayout &DL, const TargetLibraryInfo *TLI)
 Emit a call to the fwrite function. More...
 
ValueemitMalloc (Value *Num, IRBuilder<> &B, const DataLayout &DL, const TargetLibraryInfo *TLI)
 Emit a call to the malloc function. More...
 
ValueemitCalloc (Value *Num, Value *Size, const AttributeList &Attrs, IRBuilder<> &B, const TargetLibraryInfo &TLI)
 Emit a call to the calloc function. More...
 
ValueemitFWriteUnlocked (Value *Ptr, Value *Size, Value *N, Value *File, IRBuilder<> &B, const DataLayout &DL, const TargetLibraryInfo *TLI)
 Emit a call to the fwrite_unlocked function. More...
 
ValueemitFGetCUnlocked (Value *File, IRBuilder<> &B, const TargetLibraryInfo *TLI)
 Emit a call to the fgetc_unlocked function. File is a pointer to FILE. More...
 
ValueemitFGetSUnlocked (Value *Str, Value *Size, Value *File, IRBuilder<> &B, const TargetLibraryInfo *TLI)
 Emit a call to the fgets_unlocked function. More...
 
ValueemitFReadUnlocked (Value *Ptr, Value *Size, Value *N, Value *File, IRBuilder<> &B, const DataLayout &DL, const TargetLibraryInfo *TLI)
 Emit a call to the fread_unlocked function. More...
 
bool bypassSlowDivision (BasicBlock *BB, const DenseMap< unsigned int, unsigned int > &BypassWidth)
 This optimization identifies DIV instructions in a BB that can be profitably bypassed and carried out with a shorter, faster divide. More...
 
bool isLegalToPromote (CallSite CS, Function *Callee, const char **FailureReason=nullptr)
 Return true if the given indirect call site can be made to call Callee. More...
 
InstructionpromoteCall (CallSite CS, Function *Callee, CastInst **RetBitCast=nullptr)
 Promote the given indirect call site to unconditionally call Callee. More...
 
InstructionpromoteCallWithIfThenElse (CallSite CS, Function *Callee, MDNode *BranchWeights=nullptr)
 Promote the given indirect call site to conditionally call Callee. More...
 
std::unique_ptr< ModuleCloneModule (const Module &M)
 Return an exact copy of the specified module. More...
 
std::unique_ptr< ModuleCloneModule (const Module &M, ValueToValueMapTy &VMap)
 
std::unique_ptr< ModuleCloneModule (const Module &M, ValueToValueMapTy &VMap, function_ref< bool(const GlobalValue *)> ShouldCloneDefinition)
 Return a copy of the specified module. More...
 
BasicBlockCloneBasicBlock (const BasicBlock *BB, ValueToValueMapTy &VMap, const Twine &NameSuffix="", Function *F=nullptr, ClonedCodeInfo *CodeInfo=nullptr, DebugInfoFinder *DIFinder=nullptr)
 Return a copy of the specified basic block, but without embedding the block into a particular function. More...
 
FunctionCloneFunction (Function *F, ValueToValueMapTy &VMap, ClonedCodeInfo *CodeInfo=nullptr)
 Return a copy of the specified function and add it to that function's module. More...
 
void CloneFunctionInto (Function *NewFunc, const Function *OldFunc, ValueToValueMapTy &VMap, bool ModuleLevelChanges, SmallVectorImpl< ReturnInst * > &Returns, const char *NameSuffix="", ClonedCodeInfo *CodeInfo=nullptr, ValueMapTypeRemapper *TypeMapper=nullptr, ValueMaterializer *Materializer=nullptr)
 Clone OldFunc into NewFunc, transforming the old arguments into references to VMap values. More...
 
void CloneAndPruneIntoFromInst (Function *NewFunc, const Function *OldFunc, const Instruction *StartingInst, ValueToValueMapTy &VMap, bool ModuleLevelChanges, SmallVectorImpl< ReturnInst * > &Returns, const char *NameSuffix="", ClonedCodeInfo *CodeInfo=nullptr)
 This works like CloneAndPruneFunctionInto, except that it does not clone the entire function. More...
 
void CloneAndPruneFunctionInto (Function *NewFunc, const Function *OldFunc, ValueToValueMapTy &VMap, bool ModuleLevelChanges, SmallVectorImpl< ReturnInst * > &Returns, const char *NameSuffix="", ClonedCodeInfo *CodeInfo=nullptr, Instruction *TheCall=nullptr)
 This works exactly like CloneFunctionInto, except that it does some simple constant prop and DCE on the fly. More...
 
InlineResult InlineFunction (CallBase *CB, InlineFunctionInfo &IFI, AAResults *CalleeAAR=nullptr, bool InsertLifetime=true)
 This function inlines the called function into the basic block of the caller. More...
 
InlineResult InlineFunction (CallSite CS, InlineFunctionInfo &IFI, AAResults *CalleeAAR=nullptr, bool InsertLifetime=true, Function *ForwardVarArgsTo=nullptr)
 This function inlines the called function into the basic block of the caller. More...
 
LoopcloneLoopWithPreheader (BasicBlock *Before, BasicBlock *LoopDomBB, Loop *OrigLoop, ValueToValueMapTy &VMap, const Twine &NameSuffix, LoopInfo *LI, DominatorTree *DT, SmallVectorImpl< BasicBlock * > &Blocks)
 Clones a loop OrigLoop. More...
 
void remapInstructionsInBlocks (const SmallVectorImpl< BasicBlock * > &Blocks, ValueToValueMapTy &VMap)
 Remaps instructions in Blocks using the mapping in VMap. More...
 
BasicBlockDuplicateInstructionsInSplitBetween (BasicBlock *BB, BasicBlock *PredBB, Instruction *StopAt, ValueToValueMapTy &ValueMapping, DomTreeUpdater &DTU)
 Split edge between BB and PredBB and duplicate all non-Phi instructions from BB between its beginning and the StopAt instruction into the split block. More...
 
void updateProfileCallee (Function *Callee, int64_t entryDelta, const ValueMap< const Value *, WeakTrackingVH > *VMap=nullptr)
 Updates profile information by adjusting the entry count by adding entryDelta then scaling callsite information by the new count divided by the old count. More...
 
bool optimizeGlobalCtorsList (Module &M, function_ref< bool(Function *)> ShouldRemove)
 Call "ShouldRemove" for every entry in M's global_ctor list and remove the entries for which it returns true. More...
 
bool renameModuleForThinLTO (Module &M, const ModuleSummaryIndex &Index, SetVector< GlobalValue * > *GlobalsToImport=nullptr)
 Perform in-place global value handling on the given Module for exported local functions renamed and promoted for ThinLTO. More...
 
bool isSafeToDestroyConstant (const Constant *C)
 It is safe to destroy a constant iff it is only used by constants itself. More...
 
void makeGuardControlFlowExplicit (Function *DeoptIntrinsic, CallInst *Guard)
 Splits control flow at point of Guard, replacing it with explicit branch by the condition of guard's first argument. More...
 
bool expandRemainder (BinaryOperator *Rem)
 Generate code to calculate the remainder of two integers, replacing Rem with the generated code. More...
 
bool expandDivision (BinaryOperator *Div)
 Generate code to divide two integers, replacing Div with the generated code. More...
 
bool expandRemainderUpTo32Bits (BinaryOperator *Rem)
 Generate code to calculate the remainder of two integers, replacing Rem with the generated code. More...
 
bool expandRemainderUpTo64Bits (BinaryOperator *Rem)
 Generate code to calculate the remainder of two integers, replacing Rem with the generated code. More...
 
bool expandDivisionUpTo32Bits (BinaryOperator *Div)
 Generate code to divide two integers, replacing Div with the generated code. More...
 
bool expandDivisionUpTo64Bits (BinaryOperator *Div)
 Generate code to divide two integers, replacing Div with the generated code. More...
 
bool ConstantFoldTerminator (BasicBlock *BB, bool DeleteDeadConditions=false, const TargetLibraryInfo *TLI=nullptr, DomTreeUpdater *DTU=nullptr)
 If a terminator instruction is predicated on a constant value, convert it into an unconditional branch to the constant destination. More...
 
bool isInstructionTriviallyDead (Instruction *I, const TargetLibraryInfo *TLI=nullptr)
 Return true if the result produced by the instruction is not used, and the instruction has no side effects. More...
 
bool wouldInstructionBeTriviallyDead (Instruction *I, const TargetLibraryInfo *TLI=nullptr)
 Return true if the result produced by the instruction would have no side effects if it was not used. More...
 
bool RecursivelyDeleteTriviallyDeadInstructions (Value *V, const TargetLibraryInfo *TLI=nullptr, MemorySSAUpdater *MSSAU=nullptr)
 If the specified value is a trivially dead instruction, delete it. More...
 
void RecursivelyDeleteTriviallyDeadInstructions (SmallVectorImpl< Instruction * > &DeadInsts, const TargetLibraryInfo *TLI=nullptr, MemorySSAUpdater *MSSAU=nullptr)
 Delete all of the instructions in DeadInsts, and all other instructions that deleting these in turn causes to be trivially dead. More...
 
bool RecursivelyDeleteDeadPHINode (PHINode *PN, const TargetLibraryInfo *TLI=nullptr)
 If the specified value is an effectively dead PHI node, due to being a def-use chain of single-use nodes that either forms a cycle or is terminated by a trivially dead instruction, delete it. More...
 
bool SimplifyInstructionsInBlock (BasicBlock *BB, const TargetLibraryInfo *TLI=nullptr)
 Scan the specified basic block and try to simplify any instructions in it and recursively delete dead instructions. More...
 
bool replaceDbgUsesWithUndef (Instruction *I)
 Replace all the uses of an SSA value in @llvm.dbg intrinsics with undef. More...
 
void RemovePredecessorAndSimplify (BasicBlock *BB, BasicBlock *Pred, DomTreeUpdater *DTU=nullptr)
 Like BasicBlock::removePredecessor, this method is called when we're about to delete Pred as a predecessor of BB. More...
 
void MergeBasicBlockIntoOnlyPred (BasicBlock *BB, DomTreeUpdater *DTU=nullptr)
 BB is a block with one predecessor and its predecessor is known to have one successor (BB!). More...
 
bool TryToSimplifyUncondBranchFromEmptyBlock (BasicBlock *BB, DomTreeUpdater *DTU=nullptr)
 BB is known to contain an unconditional branch, and contains no instructions other than PHI nodes, potential debug intrinsics and the branch. More...
 
bool EliminateDuplicatePHINodes (BasicBlock *BB)
 Check for and eliminate duplicate PHI nodes in this block. More...
 
bool simplifyCFG (BasicBlock *BB, const TargetTransformInfo &TTI, const SimplifyCFGOptions &Options={}, SmallPtrSetImpl< BasicBlock * > *LoopHeaders=nullptr)
 This function is used to do simplification of a CFG. More...
 
bool FlattenCFG (BasicBlock *BB, AliasAnalysis *AA=nullptr)
 This function is used to flatten a CFG. More...
 
bool FoldBranchToCommonDest (BranchInst *BI, MemorySSAUpdater *MSSAU=nullptr, unsigned BonusInstThreshold=1)
 If this basic block is ONLY a setcc and a branch, and if a predecessor branches to us and one of our successors, fold the setcc into the predecessor and use logical operations to pick the right destination. More...
 
AllocaInstDemoteRegToStack (Instruction &X, bool VolatileLoads=false, Instruction *AllocaPoint=nullptr)
 This function takes a virtual register computed by an Instruction and replaces it with a slot in the stack frame, allocated via alloca. More...
 
AllocaInstDemotePHIToStack (PHINode *P, Instruction *AllocaPoint=nullptr)
 This function takes a virtual register computed by a phi node and replaces it with a slot in the stack frame, allocated via alloca. More...
 
unsigned getOrEnforceKnownAlignment (Value *V, unsigned PrefAlign, const DataLayout &DL, const Instruction *CxtI=nullptr, AssumptionCache *AC=nullptr, const DominatorTree *DT=nullptr)
 Try to ensure that the alignment of V is at least PrefAlign bytes. More...
 
unsigned getKnownAlignment (Value *V, const DataLayout &DL, const Instruction *CxtI=nullptr, AssumptionCache *AC=nullptr, const DominatorTree *DT=nullptr)
 Try to infer an alignment for the specified pointer. More...
 
void ConvertDebugDeclareToDebugValue (DbgVariableIntrinsic *DII, StoreInst *SI, DIBuilder &Builder)
 ===------------------------------------------------------------------—===// Dbg Intrinsic utilities More...
 
void ConvertDebugDeclareToDebugValue (DbgVariableIntrinsic *DII, LoadInst *LI, DIBuilder &Builder)
 Inserts a llvm.dbg.value intrinsic before a load of an alloca'd value that has an associated llvm.dbg.declare or llvm.dbg.addr intrinsic. More...
 
void ConvertDebugDeclareToDebugValue (DbgVariableIntrinsic *DII, PHINode *LI, DIBuilder &Builder)
 Inserts a llvm.dbg.value intrinsic after a phi that has an associated llvm.dbg.declare or llvm.dbg.addr intrinsic. More...
 
bool LowerDbgDeclare (Function &F)
 Lowers llvm.dbg.declare intrinsics into appropriate set of llvm.dbg.value intrinsics. More...
 
void insertDebugValuesForPHIs (BasicBlock *BB, SmallVectorImpl< PHINode * > &InsertedPHIs)
 Propagate dbg.value intrinsics through the newly inserted PHIs. More...
 
TinyPtrVector< DbgVariableIntrinsic * > FindDbgAddrUses (Value *V)
 Finds all intrinsics declaring local variables as living in the memory that 'V' points to. More...
 
void findDbgValues (SmallVectorImpl< DbgValueInst * > &DbgValues, Value *V)
 Finds the llvm.dbg.value intrinsics describing a value. More...
 
void findDbgUsers (SmallVectorImpl< DbgVariableIntrinsic * > &DbgInsts, Value *V)
 Finds the debug info intrinsics describing a value. More...
 
bool replaceDbgDeclare (Value *Address, Value *NewAddress, Instruction *InsertBefore, DIBuilder &Builder, uint8_t DIExprFlags, int Offset)
 Replaces llvm.dbg.declare instruction when the address it describes is replaced with a new value. More...
 
bool replaceDbgDeclareForAlloca (AllocaInst *AI, Value *NewAllocaAddress, DIBuilder &Builder, uint8_t DIExprFlags, int Offset)
 Replaces llvm.dbg.declare instruction when the alloca it describes is replaced with a new value. More...
 
void replaceDbgValueForAlloca (AllocaInst *AI, Value *NewAllocaAddress, DIBuilder &Builder, int Offset=0)
 Replaces multiple llvm.dbg.value instructions when the alloca it describes is replaced with a new value. More...
 
AllocaInstfindAllocaForValue (Value *V, DenseMap< Value *, AllocaInst * > &AllocaForValue)
 Finds alloca where the value comes from. More...
 
bool salvageDebugInfo (Instruction &I)
 Assuming the instruction I is going to be deleted, attempt to salvage debug users of I by writing the effect of I in a DIExpression. More...
 
bool salvageDebugInfoForDbgValues (Instruction &I, ArrayRef< DbgVariableIntrinsic * > Insns)
 Implementation of salvageDebugInfo, applying only to instructions in Insns, rather than all debug users of I. More...
 
DIExpressionsalvageDebugInfoImpl (Instruction &I, DIExpression *DIExpr, bool StackVal)
 Given an instruction I and DIExpression DIExpr operating on it, write the effects of I into the returned DIExpression, or return nullptr if it cannot be salvaged. More...
 
bool replaceAllDbgUsesWith (Instruction &From, Value &To, Instruction &DomPoint, DominatorTree &DT)
 Point debug users of From to To or salvage them. More...
 
unsigned removeAllNonTerminatorAndEHPadInstructions (BasicBlock *BB)
 Remove all instructions from a basic block other than it's terminator and any present EH pad instructions. More...
 
unsigned changeToUnreachable (Instruction *I, bool UseLLVMTrap, bool PreserveLCSSA=false, DomTreeUpdater *DTU=nullptr, MemorySSAUpdater *MSSAU=nullptr)
 Insert an unreachable instruction before the specified instruction, making it and the rest of the code in the block dead. More...
 
BasicBlockchangeToInvokeAndSplitBasicBlock (CallInst *CI, BasicBlock *UnwindEdge)
 Convert the CallInst to InvokeInst with the specified unwind edge basic block. More...
 
void removeUnwindEdge (BasicBlock *BB, DomTreeUpdater *DTU=nullptr)
 Replace 'BB's terminator with one that does not have an unwind successor block. More...
 
bool removeUnreachableBlocks (Function &F, LazyValueInfo *LVI=nullptr, DomTreeUpdater *DTU=nullptr, MemorySSAUpdater *MSSAU=nullptr)
 Remove all blocks that can not be reached from the function's entry. More...
 
void combineMetadata (Instruction *K, const Instruction *J, ArrayRef< unsigned > KnownIDs, bool DoesKMove)
 Combine the metadata of two instructions so that K can replace J. More...
 
void combineMetadataForCSE (Instruction *K, const Instruction *J, bool DoesKMove)
 Combine the metadata of two instructions so that K can replace J. More...
 
void patchReplacementInstruction (Instruction *I, Value *Repl)
 Patch the replacement so that it is not more restrictive than the value being replaced. More...
 
unsigned replaceNonLocalUsesWith (Instruction *From, Value *To)
 
unsigned replaceDominatedUsesWith (Value *From, Value *To, DominatorTree &DT, const BasicBlockEdge &Edge)
 Replace each use of 'From' with 'To' if that use is dominated by the given edge. More...
 
unsigned replaceDominatedUsesWith (Value *From, Value *To, DominatorTree &DT, const BasicBlock *BB)
 Replace each use of 'From' with 'To' if that use is dominated by the end of the given BasicBlock. More...
 
bool callsGCLeafFunction (const CallBase *Call, const TargetLibraryInfo &TLI)
 Return true if this call calls a gc leaf function. More...
 
void copyNonnullMetadata (const LoadInst &OldLI, MDNode *N, LoadInst &NewLI)
 Copy a nonnull metadata node to a new load instruction. More...
 
void copyRangeMetadata (const DataLayout &DL, const LoadInst &OldLI, MDNode *N, LoadInst &NewLI)
 Copy a range metadata node to a new load instruction. More...
 
void dropDebugUsers (Instruction &I)
 Remove the debug intrinsic instructions for the given instruction. More...
 
void hoistAllInstructionsInto (BasicBlock *DomBlock, Instruction *InsertPt, BasicBlock *BB)
 Hoist all of the instructions in the IfBlock to the dominant block DomBlock, by moving its instructions to the insertion point InsertPt. More...
 
bool recognizeBSwapOrBitReverseIdiom (Instruction *I, bool MatchBSwaps, bool MatchBitReversals, SmallVectorImpl< Instruction * > &InsertedInsts)
 Try to match a bswap or bitreverse idiom. More...
 
void maybeMarkSanitizerLibraryCallNoBuiltin (CallInst *CI, const TargetLibraryInfo *TLI)
 Given a CallInst, check if it calls a string function known to CodeGen, and mark it with NoBuiltin if so. More...
 
bool canReplaceOperandWithVariable (const Instruction *I, unsigned OpIdx)
 Given an instruction, is it legal to set operand OpIdx to a non-constant value? More...
 
bool LoopRotation (Loop *L, LoopInfo *LI, const TargetTransformInfo *TTI, AssumptionCache *AC, DominatorTree *DT, ScalarEvolution *SE, MemorySSAUpdater *MSSAU, const SimplifyQuery &SQ, bool RotationOnly, unsigned Threshold, bool IsUtilMode)
 Convert a loop into a loop with bottom test. More...
 
bool simplifyLoop (Loop *L, DominatorTree *DT, LoopInfo *LI, ScalarEvolution *SE, AssumptionCache *AC, MemorySSAUpdater *MSSAU, bool PreserveLCSSA)
 Simplify each loop in a loop nest recursively. More...
 
BasicBlockInsertPreheaderForLoop (Loop *L, DominatorTree *DT, LoopInfo *LI, MemorySSAUpdater *MSSAU, bool PreserveLCSSA)
 InsertPreheaderForLoop - Once we discover that a loop doesn't have a preheader, this method is called to insert one. More...
 
bool formDedicatedExitBlocks (Loop *L, DominatorTree *DT, LoopInfo *LI, MemorySSAUpdater *MSSAU, bool PreserveLCSSA)
 Ensure that all exit blocks of the loop are dedicated exits. More...
 
bool formLCSSAForInstructions (SmallVectorImpl< Instruction * > &Worklist, DominatorTree &DT, LoopInfo &LI)
 Ensures LCSSA form for every instruction from the Worklist in the scope of innermost containing loop. More...
 
bool formLCSSA (Loop &L, DominatorTree &DT, LoopInfo *LI, ScalarEvolution *SE)
 Put loop into LCSSA form. More...
 
bool formLCSSARecursively (Loop &L, DominatorTree &DT, LoopInfo *LI, ScalarEvolution *SE)
 Put a loop nest into LCSSA form. More...
 
bool sinkRegion (DomTreeNode *, AliasAnalysis *, LoopInfo *, DominatorTree *, TargetLibraryInfo *, TargetTransformInfo *, Loop *, AliasSetTracker *, MemorySSAUpdater *, ICFLoopSafetyInfo *, SinkAndHoistLICMFlags &, OptimizationRemarkEmitter *)
 Walk the specified region of the CFG (defined by all blocks dominated by the specified block, and that are in the current loop) in reverse depth first order w.r.t the DominatorTree. More...
 
bool hoistRegion (DomTreeNode *, AliasAnalysis *, LoopInfo *, DominatorTree *, TargetLibraryInfo *, Loop *, AliasSetTracker *, MemorySSAUpdater *, ICFLoopSafetyInfo *, SinkAndHoistLICMFlags &, OptimizationRemarkEmitter *)
 Walk the specified region of the CFG (defined by all blocks dominated by the specified block, and that are in the current loop) in depth first order w.r.t the DominatorTree. More...
 
void deleteDeadLoop (Loop *L, DominatorTree *DT, ScalarEvolution *SE, LoopInfo *LI)
 This function deletes dead loops. More...
 
bool promoteLoopAccessesToScalars (const SmallSetVector< Value *, 8 > &, SmallVectorImpl< BasicBlock * > &, SmallVectorImpl< Instruction * > &, SmallVectorImpl< MemoryAccess * > &, PredIteratorCache &, LoopInfo *, DominatorTree *, const TargetLibraryInfo *, Loop *, AliasSetTracker *, MemorySSAUpdater *, ICFLoopSafetyInfo *, OptimizationRemarkEmitter *)
 Try to promote memory values to scalars by sinking stores out of the loop and moving loads to before the loop. More...
 
SmallVector< DomTreeNode *, 16 > collectChildrenInLoop (DomTreeNode *N, const Loop *CurLoop)
 Does a BFS from a given node to all of its children inside a given loop. More...
 
SmallVector< Instruction *, 8 > findDefsUsedOutsideOfLoop (Loop *L)
 Returns the instructions that use values defined in the loop. More...
 
Optional< const MDOperand * > findStringMetadataForLoop (const Loop *TheLoop, StringRef Name)
 Find string metadata for loop. More...
 
llvm::Optional< int > getOptionalIntLoopAttribute (Loop *TheLoop, StringRef Name)
 Find named metadata for a loop with an integer value. More...
 
Optional< MDNode * > makeFollowupLoopID (MDNode *OrigLoopID, ArrayRef< StringRef > FollowupAttrs, const char *InheritOptionsAttrsPrefix="", bool AlwaysNew=false)
 Create a new loop identifier for a loop created from a loop transformation. More...
 
bool hasDisableAllTransformsHint (const Loop *L)
 Look for the loop attribute that disables all transformation heuristic. More...
 
void addStringMetadataToLoop (Loop *TheLoop, const char *MDString, unsigned V=0)
 Set input string into loop metadata by keeping other values intact. More...
 
Optional< unsignedgetLoopEstimatedTripCount (Loop *L)
 Get a loop's estimated trip count based on branch weight metadata. More...
 
bool hasIterationCountInvariantInParent (Loop *L, ScalarEvolution &SE)
 Check inner loop (L) backedge count is known to be invariant on all iterations of its outer loop. More...
 
void getLoopAnalysisUsage (AnalysisUsage &AU)
 Helper to consistently add the set of standard passes to a loop pass's AnalysisUsage. More...
 
bool canSinkOrHoistInst (Instruction &I, AAResults *AA, DominatorTree *DT, Loop *CurLoop, AliasSetTracker *CurAST, MemorySSAUpdater *MSSAU, bool TargetExecutesOncePerLoop, SinkAndHoistLICMFlags *LICMFlags=nullptr, OptimizationRemarkEmitter *ORE=nullptr)
 Returns true if is legal to hoist or sink this instruction disregarding the possible introduction of faults. More...
 
ValuecreateMinMaxOp (IRBuilder<> &Builder, RecurrenceDescriptor::MinMaxRecurrenceKind RK, Value *Left, Value *Right)
 Returns a Min/Max operation corresponding to MinMaxRecurrenceKind. More...
 
ValuegetOrderedReduction (IRBuilder<> &Builder, Value *Acc, Value *Src, unsigned Op, RecurrenceDescriptor::MinMaxRecurrenceKind MinMaxKind=RecurrenceDescriptor::MRK_Invalid, ArrayRef< Value * > RedOps=None)
 Generates an ordered vector reduction using extracts to reduce the value. More...
 
ValuegetShuffleReduction (IRBuilder<> &Builder, Value *Src, unsigned Op, RecurrenceDescriptor::MinMaxRecurrenceKind MinMaxKind=RecurrenceDescriptor::MRK_Invalid, ArrayRef< Value * > RedOps=None)
 Generates a vector reduction using shufflevectors to reduce the value. More...
 
ValuecreateSimpleTargetReduction (IRBuilder<> &B, const TargetTransformInfo *TTI, unsigned Opcode, Value *Src, TargetTransformInfo::ReductionFlags Flags=TargetTransformInfo::ReductionFlags(), ArrayRef< Value * > RedOps=None)
 Create a target reduction of the given vector. More...
 
ValuecreateTargetReduction (IRBuilder<> &B, const TargetTransformInfo *TTI, RecurrenceDescriptor &Desc, Value *Src, bool NoNaN=false)
 Create a generic target reduction using a recurrence descriptor Desc The target is queried to determine if intrinsics or shuffle sequences are required to implement the reduction. More...
 
void propagateIRFlags (Value *I, ArrayRef< Value * > VL, Value *OpValue=nullptr)
 Get the intersection (logical and) of all of the potential IR flags of each scalar operation (VL) that will be converted into a vector (I). More...
 
bool isKnownNegativeInLoop (const SCEV *S, const Loop *L, ScalarEvolution &SE)
 Returns true if we can prove that S is defined and always negative in loop L. More...
 
bool isKnownNonNegativeInLoop (const SCEV *S, const Loop *L, ScalarEvolution &SE)
 Returns true if we can prove that S is defined and always non-negative in loop L. More...
 
bool cannotBeMaxInLoop (const SCEV *S, const Loop *L, ScalarEvolution &SE, bool Signed)
 Returns true if S is defined and never is equal to signed/unsigned max. More...
 
bool cannotBeMinInLoop (const SCEV *S, const Loop *L, ScalarEvolution &SE, bool Signed)
 Returns true if S is defined and never is equal to signed/unsigned min. More...
 
void createMemCpyLoopUnknownSize (Instruction *InsertBefore, Value *SrcAddr, Value *DstAddr, Value *CopyLen, unsigned SrcAlign, unsigned DestAlign, bool SrcIsVolatile, bool DstIsVolatile, const TargetTransformInfo &TTI)
 Emit a loop implementing the semantics of llvm.memcpy where the size is not a compile-time constant. More...
 
void createMemCpyLoopKnownSize (Instruction *InsertBefore, Value *SrcAddr, Value *DstAddr, ConstantInt *CopyLen, unsigned SrcAlign, unsigned DestAlign, bool SrcIsVolatile, bool DstIsVolatile, const TargetTransformInfo &TTI)
 Emit a loop implementing the semantics of an llvm.memcpy whose size is a compile time constant. More...
 
void expandMemCpyAsLoop (MemCpyInst *MemCpy, const TargetTransformInfo &TTI)
 Expand MemCpy as a loop. MemCpy is not deleted. More...
 
void expandMemMoveAsLoop (MemMoveInst *MemMove)
 Expand MemMove as a loop. MemMove is not deleted. More...
 
void expandMemSetAsLoop (MemSetInst *MemSet)
 Expand MemSet as a loop. MemSet is not deleted. More...
 
void appendToGlobalCtors (Module &M, Function *F, int Priority, Constant *Data=nullptr)
 Append F to the list of global ctors of module M with the given Priority. More...
 
void appendToGlobalDtors (Module &M, Function *F, int Priority, Constant *Data=nullptr)
 Same as appendToGlobalCtors(), but for global dtors. More...
 
FunctionCallee declareSanitizerInitFunction (Module &M, StringRef InitName, ArrayRef< Type * > InitArgTypes)
 
std::pair< Function *, FunctionCalleecreateSanitizerCtorAndInitFunctions (Module &M, StringRef CtorName, StringRef InitName, ArrayRef< Type * > InitArgTypes, ArrayRef< Value * > InitArgs, StringRef VersionCheckName=StringRef())
 Creates sanitizer constructor function, and calls sanitizer's init function from it. More...
 
std::pair< Function *, FunctionCalleegetOrCreateSanitizerCtorAndInitFunctions (Module &M, StringRef CtorName, StringRef InitName, ArrayRef< Type * > InitArgTypes, ArrayRef< Value * > InitArgs, function_ref< void(Function *, FunctionCallee)> FunctionsCreatedCallback, StringRef VersionCheckName=StringRef())
 Creates sanitizer constructor function lazily. More...
 
FunctiongetOrCreateInitFunction (Module &M, StringRef Name)
 
bool nameUnamedGlobals (Module &M)
 Rename all the anon globals in the module using a hash computed from the list of public globals in the module. More...
 
void appendToUsed (Module &M, ArrayRef< GlobalValue * > Values)
 Adds global values to the llvm.used list. More...
 
void appendToCompilerUsed (Module &M, ArrayRef< GlobalValue * > Values)
 Adds global values to the llvm.compiler.used list. More...
 
void filterDeadComdatFunctions (Module &M, SmallVectorImpl< Function * > &DeadComdatFunctions)
 Filter out potentially dead comdat functions where other entries keep the entire comdat group alive. More...
 
std::string getUniqueModuleId (Module *M)
 Produce a unique identifier for this module by taking the MD5 sum of the names of the module's strong external symbols that are not comdat members. More...
 
bool isAllocaPromotable (const AllocaInst *AI)
 Return true if this alloca is legal for promotion. More...
 
void PromoteMemToReg (ArrayRef< AllocaInst * > Allocas, DominatorTree &DT, AssumptionCache *AC=nullptr)
 Promote the specified list of alloca instructions into scalar registers, inserting PHI nodes as appropriate. More...
 
bool simplifyUsersOfIV (PHINode *CurrIV, ScalarEvolution *SE, DominatorTree *DT, LoopInfo *LI, SmallVectorImpl< WeakTrackingVH > &Dead, SCEVExpander &Rewriter, IVVisitor *V=nullptr)
 simplifyUsersOfIV - Simplify instructions that use this induction variable by using ScalarEvolution to analyze the IV's recurrence. More...
 
bool simplifyLoopIVs (Loop *L, ScalarEvolution *SE, DominatorTree *DT, LoopInfo *LI, SmallVectorImpl< WeakTrackingVH > &Dead)
 SimplifyLoopIVs - Simplify users of induction variables within this loop. More...
 
bool shouldOptimizeForSize (Function *F, ProfileSummaryInfo *PSI, BlockFrequencyInfo *BFI)
 Returns true if function F is suggested to be size-optimized base on the profile. More...
 
bool shouldOptimizeForSize (BasicBlock *BB, ProfileSummaryInfo *PSI, BlockFrequencyInfo *BFI)
 Returns true if basic block BB is suggested to be size-optimized base on the profile. More...
 
void SplitModule (std::unique_ptr< Module > M, unsigned N, function_ref< void(std::unique_ptr< Module > MPart)> ModuleCallback, bool PreserveLocals=false)
 Splits the module M into N linkable partitions. More...
 
ModulePasscreateRewriteSymbolsPass ()
 
ModulePasscreateRewriteSymbolsPass (SymbolRewriter::RewriteDescriptorList &)
 
PasscreateUnifyFunctionExitNodesPass ()
 
const LoopaddClonedBlockToLoopInfo (BasicBlock *OriginalBB, BasicBlock *ClonedBB, LoopInfo *LI, NewLoopsMap &NewLoops)
 Adds ClonedBB to LoopInfo, creates a new loop for ClonedBB if necessary and adds a mapping from the original loop to the new loop to NewLoops. More...
 
LoopUnrollResult UnrollLoop (Loop *L, UnrollLoopOptions ULO, LoopInfo *LI, ScalarEvolution *SE, DominatorTree *DT, AssumptionCache *AC, OptimizationRemarkEmitter *ORE, bool PreserveLCSSA, Loop **RemainderLoop=nullptr)
 Unroll the given loop by Count. More...
 
bool UnrollRuntimeLoopRemainder (Loop *L, unsigned Count, bool AllowExpensiveTripCount, bool UseEpilogRemainder, bool UnrollRemainder, bool ForgetAllSCEV, LoopInfo *LI, ScalarEvolution *SE, DominatorTree *DT, AssumptionCache *AC, bool PreserveLCSSA, Loop **ResultLoop=nullptr)
 Insert code in the prolog/epilog code when unrolling a loop with a run-time trip-count. More...
 
void computePeelCount (Loop *L, unsigned LoopSize, TargetTransformInfo::UnrollingPreferences &UP, unsigned &TripCount, ScalarEvolution &SE)
 
bool canPeel (Loop *L)
 
bool peelLoop (Loop *L, unsigned PeelCount, LoopInfo *LI, ScalarEvolution *SE, DominatorTree *DT, AssumptionCache *AC, bool PreserveLCSSA)
 Peel off the first PeelCount iterations of loop L. More...
 
LoopUnrollResult UnrollAndJamLoop (Loop *L, unsigned Count, unsigned TripCount, unsigned TripMultiple, bool UnrollRemainder, LoopInfo *LI, ScalarEvolution *SE, DominatorTree *DT, AssumptionCache *AC, OptimizationRemarkEmitter *ORE, Loop **EpilogueLoop=nullptr)
 
bool isSafeToUnrollAndJam (Loop *L, ScalarEvolution &SE, DominatorTree &DT, DependenceInfo &DI)
 
bool computeUnrollCount (Loop *L, const TargetTransformInfo &TTI, DominatorTree &DT, LoopInfo *LI, ScalarEvolution &SE, const SmallPtrSetImpl< const Value * > &EphValues, OptimizationRemarkEmitter *ORE, unsigned &TripCount, unsigned MaxTripCount, unsigned &TripMultiple, unsigned LoopSize, TargetTransformInfo::UnrollingPreferences &UP, bool &UseUpperBound)
 
void remapInstruction (Instruction *I, ValueToValueMapTy &VMap)
 Convert the instruction operands from referencing the current values into those specified by VMap. More...
 
void simplifyLoopAfterUnroll (Loop *L, bool SimplifyIVs, LoopInfo *LI, ScalarEvolution *SE, DominatorTree *DT, AssumptionCache *AC)
 Perform some cleanup and simplifications on loops after unrolling. More...
 
MDNodeGetUnrollMetadata (MDNode *LoopID, StringRef Name)
 Given an llvm.loop loop id metadata node, returns the loop hint metadata node with the given name (for example, "llvm.loop.unroll.count"). More...
 
TargetTransformInfo::UnrollingPreferences gatherUnrollingPreferences (Loop *L, ScalarEvolution &SE, const TargetTransformInfo &TTI, BlockFrequencyInfo *BFI, ProfileSummaryInfo *PSI, int OptLevel, Optional< unsigned > UserThreshold, Optional< unsigned > UserCount, Optional< bool > UserAllowPartial, Optional< bool > UserRuntime, Optional< bool > UserUpperBound, Optional< bool > UserAllowPeeling)
 Gather the various unrolling parameters based on the defaults, compiler flags, TTI overrides and user specified parameters. More...
 
unsigned ApproximateLoopSize (const Loop *L, unsigned &NumCalls, bool &NotDuplicatable, bool &Convergent, const TargetTransformInfo &TTI, const SmallPtrSetImpl< const Value * > &EphValues, unsigned BEInsns)
 ApproximateLoopSize - Approximate the size of the loop. More...
 
RemapFlags operator| (RemapFlags LHS, RemapFlags RHS)
 
ValueMapValue (const Value *V, ValueToValueMapTy &VM, RemapFlags Flags=RF_None, ValueMapTypeRemapper *TypeMapper=nullptr, ValueMaterializer *Materializer=nullptr)
 Look up or compute a value in the value map. More...
 
MetadataMapMetadata (const Metadata *MD, ValueToValueMapTy &VM, RemapFlags Flags=RF_None, ValueMapTypeRemapper *TypeMapper=nullptr, ValueMaterializer *Materializer=nullptr)
 Lookup or compute a mapping for a piece of metadata. More...
 
MDNodeMapMetadata (const MDNode *MD, ValueToValueMapTy &VM, RemapFlags Flags=RF_None, ValueMapTypeRemapper *TypeMapper=nullptr, ValueMaterializer *Materializer=nullptr)
 Version of MapMetadata with type safety for MDNode. More...
 
void RemapInstruction (Instruction *I, ValueToValueMapTy &VM, RemapFlags Flags=RF_None, ValueMapTypeRemapper *TypeMapper=nullptr, ValueMaterializer *Materializer=nullptr)
 Convert the instruction operands from referencing the current values into those specified by VM. More...
 
void RemapFunction (Function &F, ValueToValueMapTy &VM, RemapFlags Flags=RF_None, ValueMapTypeRemapper *TypeMapper=nullptr, ValueMaterializer *Materializer=nullptr)
 Remap the operands, metadata, arguments, and instructions of a function. More...
 
ConstantMapValue (const Constant *V, ValueToValueMapTy &VM, RemapFlags Flags=RF_None, ValueMapTypeRemapper *TypeMapper=nullptr, ValueMaterializer *Materializer=nullptr)
 Version of MapValue with type safety for Constant. More...
 
PasscreateLoopVectorizePass ()
 
PasscreateLoopVectorizePass (bool InterleaveOnlyWhenForced, bool VectorizeOnlyWhenForced)
 
PasscreateSLPVectorizerPass ()
 
bool vectorizeBasicBlock (Pass *P, BasicBlock &BB, const VectorizeConfig &C=VectorizeConfig())
 Vectorize the BasicBlock. More...
 
PasscreateLoadStoreVectorizerPass ()
 Create a legacy pass manager instance of the LoadStoreVectorizer pass. More...
 
OptimizationRemarkAnalysis createLVMissedAnalysis (const char *PassName, StringRef RemarkName, Loop *TheLoop, Instruction *I=nullptr)
 Create an analysis remark that explains why vectorization failed. More...
 
static GVDAGType getGVDT ()
 
template const SimplifyQuery getBestSimplifyQuery (AnalysisManager< Function > &, Function &)
 
PasscreateLAAPass ()
 
static DescVector getDescriptions ()
 
static DWARFExpression::Operation::Description getOpDesc (unsigned OpCode)
 
static uint8_t getRefAddrSize (uint8_t AddrSize, uint16_t Version)
 
static bool prettyPrintRegisterOp (raw_ostream &OS, uint8_t Opcode, uint64_t Operands[2], const MCRegisterInfo *MRI, bool isEH)
 
llvm::raw_ostreamoperator<< (llvm::raw_ostream &OS, const GUID &G)
 
ConstantConstantFoldCastInstruction (unsigned opcode, Constant *V, Type *DestTy)
 
ConstantConstantFoldUnaryInstruction (unsigned Opcode, Constant *V)
 
ConstantConstantFoldBinaryInstruction (unsigned Opcode, Constant *V1, Constant *V2)
 
ConstantConstantFoldCompareInstruction (unsigned short predicate, Constant *C1, Constant *C2)
 
ConstantConstantFoldGetElementPtr (Type *Ty, Constant *C, bool InBounds, Optional< unsigned > InRangeIndex, ArrayRef< Value * > Idxs)
 
static const Metadataget_hashable_data (const MDOperand &X)
 Make MDOperand transparent for hashing. More...
 
template<class T , class InfoT >
static T * getUniqued (DenseSet< T *, InfoT > &Store, const typename InfoT::KeyTy &Key)
 
static bool matchPassManager (StringRef PassID)
 
static unsigned int partCountForBits (unsigned int bits)
 
static unsigned int decDigitValue (unsigned int c)
 
static int readExponent (StringRef::iterator begin, StringRef::iterator end)
 
static int totalExponent (StringRef::iterator p, StringRef::iterator end, int exponentAdjustment)
 
static StringRef::iterator skipLeadingZeroesAndAnyDot (StringRef::iterator begin, StringRef::iterator end, StringRef::iterator *dot)
 
static void interpretDecimal (StringRef::iterator begin, StringRef::iterator end, decimalInfo *D)
 
static lostFraction trailingHexadecimalFraction (StringRef::iterator p, StringRef::iterator end, unsigned int digitValue)
 
static lostFraction lostFractionThroughTruncation (const APFloatBase::integerPart *parts, unsigned int partCount, unsigned int bits)
 
static lostFraction shiftRight (APFloatBase::integerPart *dst, unsigned int parts, unsigned int bits)
 
static lostFraction combineLostFractions (lostFraction moreSignificant, lostFraction lessSignificant)
 
static unsigned int HUerrBound (bool inexactMultiply, unsigned int HUerr1, unsigned int HUerr2)
 
static APFloatBase::integerPart ulpsFromBoundary (const APFloatBase::integerPart *parts, unsigned int bits, bool isNearest)
 
static unsigned int powerOf5 (APFloatBase::integerPart *dst, unsigned int power)
 
static unsigned int partAsHex (char *dst, APFloatBase::integerPart part, unsigned int count, const char *hexDigitChars)
 
static charwriteUnsignedDecimal (char *dst, unsigned int n)
 
static charwriteSignedDecimal (char *dst, int value)
 
hash_code hash_value (const APFloat &Arg)
 
static struct tm getStructTM (TimePoint<> TP)
 
static Boolean isLegalUTF8 (const UTF8 *source, int length)
 
static unsigned findMaximalSubpartOfIllFormedUTF8Sequence (const UTF8 *source, const UTF8 *sourceEnd)
 
static ConversionResult ConvertUTF8toUTF32Impl (const UTF8 **sourceStart, const UTF8 *sourceEnd, UTF32 **targetStart, UTF32 *targetEnd, ConversionFlags flags, Boolean InputIsPartial)
 
template<typename TResult >
static bool ConvertUTF8toWideInternal (llvm::StringRef Source, TResult &Result)
 
void * SearchForAddressOfSpecialSymbol (const char *SymbolName)
 
PrettyStackTraceEntryReverseStackTrace (PrettyStackTraceEntry *Head)
 
bool RunningWindows8OrGreater ()
 Determines if the program is running on Windows 8 or newer. More...
 
llvm::VersionTuple GetWindowsOSVersion ()
 Returns the Windows version as Major.Minor.0.BuildNumber. More...
 
bool MakeErrMsg (std::string *ErrMsg, const std::string &prefix)
 
template<class T >
SmallVectorImpl< T >::const_pointer c_str (SmallVectorImpl< T > &str)
 
void initializeCoroEarlyPass (PassRegistry &)
 
void initializeCoroSplitPass (PassRegistry &)
 
void initializeCoroElidePass (PassRegistry &)
 
void initializeCoroCleanupPass (PassRegistry &)
 
static unsigned getComplexity (Value *V)
 Assign a complexity or rank value to LLVM Values. More...
 
static bool isCanonicalPredicate (CmpInst::Predicate Pred)
 Predicate canonicalization reduces the number of patterns that need to be matched by other transforms. More...
 
static ValuepeekThroughBitcast (Value *V, bool OneUseOnly=false)
 Return the source operand of a potentially bitcasted value while optionally checking if it has one use. More...
 
static ConstantAddOne (Constant *C)
 Add one to a Constant. More...
 
static ConstantSubOne (Constant *C)
 Subtract one from a Constant. More...
 
static bool IsFreeToInvert (Value *V, bool WillInvertAllUses)
 Return true if the specified value is free to invert (apply ~ to). More...
 
static ConstantgetSafeVectorConstantForBinop (BinaryOperator::BinaryOps Opcode, Constant *In, bool IsRHSConstant)
 Some binary operators require special handling to avoid poison and undefined behavior. More...
 
raw_ostreamoperator<< (raw_ostream &OS, BBState &BBState) LLVM_ATTRIBUTE_UNUSED
 
static void combineKnownMetadata (Instruction *ReplInst, Instruction *I)
 
void initializeInferAddressSpacesPass (PassRegistry &)
 
static unsigned ComputeSpeculationCost (const Instruction *I, const TargetTransformInfo &TTI)
 
static bool CompareVars (const ASanStackVariableDescription &a, const ASanStackVariableDescription &b)
 
static size_t VarAndRedzoneSize (size_t Size, size_t Granularity, size_t Alignment)
 
void collectCmpOps (CmpInst *Comparison, SmallVectorImpl< Value * > &CmpOperands)
 
static FunctiongetCopyDeclaration (Module *M, Type *Ty)
 
static void replaceCreatedSSACopys (PredicateInfo &PredInfo, Function &F)
 
static void debugVectorizationFailure (const StringRef DebugMsg, Instruction *I)
 
static bool isUniformLoop (Loop *Lp, Loop *OuterLp)
 
static bool isUniformLoopNest (Loop *Lp, Loop *OuterLp)
 
static bool canIfConvertPHINodes (BasicBlock *BB)
 Check whether it is safe to if-convert this phi node. More...
 
static TypeconvertPointerToIntegerType (const DataLayout &DL, Type *Ty)
 
static TypegetWiderType (const DataLayout &DL, Type *Ty0, Type *Ty1)
 
static bool hasOutsideLoopUser (const Loop *TheLoop, Instruction *Inst, SmallPtrSetImpl< Value * > &AllowedExit)
 Check that the instruction has outside loop users and is not an identified reduction variable. More...
 
raw_ostreamoperator<< (raw_ostream &OS, const VPlanIngredient &I)
 
raw_ostreamoperator<< (raw_ostream &OS, VPlan &Plan)
 
raw_ostreamoperator<< (raw_ostream &OS, const VPValue &V)
 
TransformationMode hasUnrollTransformation (Loop *L)
 
TransformationMode hasUnrollAndJamTransformation (Loop *L)
 
TransformationMode hasVectorizeTransformation (Loop *L)
 
TransformationMode hasDistributeTransformation (Loop *L)
 
TransformationMode hasLICMVersioningTransformation (Loop *L)
 

Variables

unsigned constexpr DefaultMaxUsesToExplore = 20
 The default value for MaxUsesToExplore argument. More...
 
cl::opt< unsignedDefMaxInstsToScan
 The default number of maximum instructions to scan in the block, used by FindAvailableLoadedValue(). More...
 
cl::opt< boolEnableMSSALoopDependency
 Enables memory ssa as a dependency for loop passes. More...
 
bool TimePassesIsEnabled = false
 If the user specifies the -time-passes argument on an LLVM tool command line then the value of this boolean will be true, otherwise false. More...
 
bool DebugFlag = false
 This boolean is set to true if the '-debug' command line option is specified. More...
 
bool EnableDebugBuffering = false
 EnableDebugBuffering - This defaults to false. More...
 
static const unsigned char BitReverseTable256 [256]
 Macro compressed bit reversal table for 256 bits. More...
 
const float huge_valf = HUGE_VALF
 Use this rather than HUGE_VALF; the latter causes warnings on MSVC. More...
 
TimeTraceProfilerTimeTraceProfilerInstance = nullptr
 
cl::OptionCategory ColorCategory
 
charDemoteRegisterToMemoryID = RegToMem::ID
 
charInferAddressSpacesID
 
cl::opt< unsignedSetLicmMssaOptCap
 
cl::opt< unsignedSetLicmMssaNoAccForPromotionCap
 
cl::opt< boolForgetSCEVInLoopUnroll
 
charLowerInvokePassID = LowerInvokeLegacyPass::ID
 
charInstructionNamerID
 
charLowerSwitchID = LowerSwitch::ID
 
charBreakCriticalEdgesID
 
charLCSSAID = LCSSAWrapperPass::ID
 
charLoopSimplifyID = LoopSimplify::ID
 
static const int kAsanStackLeftRedzoneMagic = 0xf1
 
static const int kAsanStackMidRedzoneMagic = 0xf2
 
static const int kAsanStackRightRedzoneMagic = 0xf3
 
static const int kAsanStackUseAfterReturnMagic = 0xf5
 
static const int kAsanStackUseAfterScopeMagic = 0xf8
 
cl::opt< boolEnableLoopInterleaving
 
cl::opt< boolEnableLoopVectorization
 
cl::opt< boolRunSLPVectorization
 
static cl::opt< bool, trueEnableTiming ("time-passes", cl::location(TimePassesIsEnabled), cl::Hidden, cl::desc("Time each pass, printing elapsed time for each on exit"))
 
cl::opt< boolLTODiscardValueNames ("lto-discard-value-names", cl::desc("Strip names from Value during LTO (other than GlobalValue)."), cl::init(false), cl::Hidden)
 
cl::opt< boolRemarksWithHotness ("lto-pass-remarks-with-hotness", cl::desc("With PGO, include profile count in optimization remarks"), cl::Hidden)
 
cl::opt< std::string > RemarksFilename ("lto-pass-remarks-output", cl::desc("Output filename for pass remarks"), cl::value_desc("filename"))
 
cl::opt< std::string > RemarksPasses ("lto-pass-remarks-filter", cl::desc("Only record optimization remarks from passes whose " "names match the given regular expression"), cl::value_desc("regex"))
 
cl::opt< std::string > RemarksFormat ("lto-pass-remarks-format", cl::desc("The format used for serializing remarks (default: YAML)"), cl::value_desc("format"), cl::init("yaml"))
 
cl::opt< std::string > LTOStatsFile ("lto-stats-file", cl::desc("Save statistics to the specified file"), cl::Hidden)
 
static const fltSemantics semIEEEhalf = {15, -14, 11, 16}
 
static const fltSemantics semIEEEsingle = {127, -126, 24, 32}
 
static const fltSemantics semIEEEdouble = {1023, -1022, 53, 64}
 
static const fltSemantics semIEEEquad = {16383, -16382, 113, 128}
 
static const fltSemantics semX87DoubleExtended = {16383, -16382, 64, 80}
 
static const fltSemantics semBogus = {0, 0, 0, 0}
 
static const fltSemantics semPPCDoubleDouble = {-1, 0, 0, 0}
 
static const fltSemantics semPPCDoubleDoubleLegacy
 
const unsigned int maxExponent = 16383
 
const unsigned int maxPrecision = 113
 
const unsigned int maxPowerOfFiveExponent = maxExponent + maxPrecision - 1
 
const unsigned int maxPowerOfFiveParts = 2 + ((maxPowerOfFiveExponent * 815) / (351 * APFloatBase::integerPartWidth))
 
static const char hexDigitsLower [] = "0123456789abcdef0"
 
static const char hexDigitsUpper [] = "0123456789ABCDEF0"
 
static const char infinityL [] = "infinity"
 
static const char infinityU [] = "INFINITY"
 
static const char NaNL [] = "nan"
 
static const char NaNU [] = "NAN"
 
static const int halfShift = 10
 
static const UTF32 halfBase = 0x0010000UL
 
static const UTF32 halfMask = 0x3FFUL
 
static const char trailingBytesForUTF8 [256]
 
static const UTF32 offsetsFromUTF8 [6]
 
static const UTF8 firstByteMark [7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC }
 
static ManagedStatic< std::vector< std::string > > CurrentDebugType
 
int DisableABIBreakingChecks
 
static cl::opt< unsignedTimeTraceGranularity ("time-trace-granularity", cl::desc("Minimum time granularity (in microseconds) traced by time profiler"), cl::init(500))
 
charPGOMemOPSizeOptID = PGOMemOPSizeOptLegacyPass::ID
 
static const size_t kMinAlignment = 16
 
charLibCallsShrinkWrapPassID = LibCallsShrinkWrapLegacyPass::ID
 
Verification flags.

These flags turns on/off that are expensive and are turned off by default, unless macro EXPENSIVE_CHECKS is defined.

The flags allow selectively turning the checks on without need to recompile.

bool VerifyDomInfo = false
 Enables verification of dominator trees. More...
 
bool VerifyLoopInfo = false
 Enables verification of loop info. More...
 
bool VerifyMemorySSA = false
 Enables verification of MemorySSA. More...
 
const char *const LLVMLoopUnrollFollowupAll = "llvm.loop.unroll.followup_all"
 
const char *const LLVMLoopUnrollFollowupUnrolled
 
const char *const LLVMLoopUnrollFollowupRemainder
 

Detailed Description

This class represents lattice values for constants.

Implement a low-level type suitable for MachineInstr level instruction selection.

\macro LLVM_ENABLE_EXCEPTIONS Whether LLVM is built with exception support.

Lightweight arrays that are backed by an arbitrary BinaryStream.

This file contains the declaration of the GlobalIFunc class, which represents a single indirect function in the IR.

FIXME: This is basically just for bringup, this can be made a lot more rich in the future.

Indirect function uses ELF symbol type extension to mark that the address of a declaration should be resolved at runtime by calling a resolver function.

This file provides two different array implementations.

VarStreamArray - Arrays of variable length records.  The user specifies
  an Extractor type that can extract a record from a given offset and
  return the number of bytes consumed by the record.

FixedStreamArray - Arrays of fixed length records.  This is similar in
  spirit to ArrayRef<T>, but since it is backed by a BinaryStream, the
  elements of the array need not be laid out in contiguous memory. 

For a type attached to a MachineInstr, we only care about 2 details: total size and the number of vector lanes (if any). Accordingly, there are 4 possible valid type-kinds:

Other information required for correct selection is expected to be carried by the opcode, or non-type flags. For example the distinction between G_ADD and G_FADD for int/float or fast-math flags.

Typedef Documentation

◆ AliasAnalysis

using llvm::AliasAnalysis = typedef AAResults

Temporary typedef for legacy code that uses a generic AliasAnalysis pointer or reference.

Definition at line 812 of file AliasAnalysis.h.

◆ BBSideEffectsSet

using llvm::BBSideEffectsSet = typedef DenseMap<const BasicBlock *, bool>

Definition at line 117 of file GVNHoist.cpp.

◆ BFIDOTGTraitsBase

Definition at line 122 of file BlockFrequencyInfo.cpp.

◆ binop_eval_t

using llvm::binop_eval_t = typedef uint64_t (*)(uint64_t, uint64_t)

Type of functions evaluating a given binary operation.

Definition at line 151 of file FileCheck.h.

◆ Boolean

Definition at line 112 of file ConvertUTF.h.

◆ BumpPtrAllocator

The standard BumpPtrAllocator which just uses the default template parameters.

Definition at line 434 of file Allocator.h.

◆ CFGUpdate

Definition at line 66 of file MemorySSAUpdater.h.

◆ CGSCCAnalysisManager

The CGSCC analysis manager.

See the documentation for the AnalysisManager template for detail documentation. This type serves as a convenient way to refer to this construct in the adaptors and proxies used to integrate this into the larger pass manager infrastructure.

Definition at line 127 of file CGSCCPassManager.h.

◆ CGSCCAnalysisManagerFunctionProxy

A proxy from a CGSCCAnalysisManager to a Function.

Definition at line 407 of file CGSCCPassManager.h.

◆ CGSCCAnalysisManagerModuleProxy

A proxy from a CGSCCAnalysisManager to a Module.

Definition at line 166 of file CGSCCPassManager.h.

◆ CGSCCPassManager

The CGSCC pass manager.

See the documentation for the PassManager template for details. It runs a sequence of SCC passes over each SCC that the manager is run over. This type serves as a convenient way to refer to this construct.

Definition at line 147 of file CGSCCPassManager.h.

◆ CHIArgs

using llvm::CHIArgs = typedef iterator_range<CHIIt>

Definition at line 156 of file GVNHoist.cpp.

◆ CHIIt

using llvm::CHIIt = typedef SmallVectorImpl<CHIArg>::iterator

Definition at line 155 of file GVNHoist.cpp.

◆ ColorVector

typedef TinyPtrVector<BasicBlock *> llvm::ColorVector

Definition at line 108 of file EHPersonalities.h.

◆ const_gvsummary_iterator

using llvm::const_gvsummary_iterator = typedef GlobalValueSummaryMapTy::const_iterator

Type used for iterating through the global value summary map.

Definition at line 872 of file ModuleSummaryIndex.h.

◆ const_inst_iterator

Definition at line 124 of file InstIterator.h.

◆ const_inst_range

using llvm::const_inst_range = typedef iterator_range<const_inst_iterator>

Definition at line 129 of file InstIterator.h.

◆ const_memoryaccess_def_iterator

Definition at line 132 of file MemorySSA.h.

◆ const_pred_iterator

Definition at line 103 of file CFG.h.

◆ ConstBlockSet

using llvm::ConstBlockSet = typedef SmallPtrSet<const BasicBlock *, 4>

Definition at line 32 of file SyncDependenceAnalysis.h.

◆ ConstMemoryAccessPair

using llvm::ConstMemoryAccessPair = typedef std::pair<const MemoryAccess *, MemoryLocation>

Definition at line 1074 of file MemorySSA.h.

◆ ConstOperandBundleDef

Definition at line 1080 of file InstrTypes.h.

◆ CountAndDurationType

typedef std::pair<size_t, DurationType> llvm::CountAndDurationType

Definition at line 36 of file TimeProfiler.cpp.

◆ DescVector

Definition at line 23 of file DWARFExpression.cpp.

◆ DiagnosticHandlerFunction

using llvm::DiagnosticHandlerFunction = typedef std::function<void(const DiagnosticInfo &)>

Definition at line 122 of file DiagnosticInfo.h.

◆ DictScope

using llvm::DictScope = typedef DelimitedScope<'{', '}'>

Definition at line 383 of file ScopedPrinter.h.

◆ DILineInfoTable

using llvm::DILineInfoTable = typedef SmallVector<std::pair<uint64_t, DILineInfo>, 16>

Definition at line 74 of file DIContext.h.

◆ DomTreeBase

template<typename T >
using llvm::DomTreeBase = typedef DominatorTreeBase<T, false>

Definition at line 856 of file GenericDomTree.h.

◆ DomTreeNode

Definition at line 74 of file Dominators.h.

◆ DurationType

typedef duration<steady_clock::rep, steady_clock::period> llvm::DurationType

Definition at line 35 of file TimeProfiler.cpp.

◆ DWARFAddressRangesVector

using llvm::DWARFAddressRangesVector = typedef std::vector<DWARFAddressRange>

DWARFAddressRangesVector - represents a set of absolute address ranges.

Definition at line 57 of file DWARFAddressRange.h.

◆ fatal_error_handler_t

typedef void(* llvm::fatal_error_handler_t) (void *user_data, const std::string &reason, bool gen_crash_diag)

An error handler callback.

Definition at line 25 of file ErrorHandling.h.

◆ ForwardIDFCalculator

using llvm::ForwardIDFCalculator = typedef IDFCalculator<false>

Definition at line 55 of file IteratedDominanceFrontier.h.

◆ function_interval_iterator

Definition at line 244 of file IntervalIterator.h.

◆ FunctionAnalysisManager

Convenience typedef for the Function analysis manager.

Definition at line 1025 of file PassManager.h.

◆ FunctionAnalysisManagerLoopProxy

A proxy from a FunctionAnalysisManager to a Loop.

Definition at line 150 of file LoopAnalysisManager.h.

◆ FunctionAnalysisManagerModuleProxy

Provide the FunctionAnalysisManager to Module proxy.

Definition at line 1126 of file PassManager.h.

◆ FunctionPassManager

Convenience typedef for a pass manager over functions.

Definition at line 574 of file PassManager.h.

◆ FunctionRPOT

using llvm::FunctionRPOT = typedef ReversePostOrderTraversal<const Function *>

Definition at line 127 of file SyncDependenceAnalysis.cpp.

◆ gep_type_iterator

Definition at line 125 of file GetElementPtrTypeIterator.h.

◆ GlobalValueSummaryList

using llvm::GlobalValueSummaryList = typedef std::vector<std::unique_ptr<GlobalValueSummary> >

Definition at line 120 of file ModuleSummaryIndex.h.

◆ GlobalValueSummaryMapTy

Map from global value GUID to corresponding summary structures.

Use a std::map rather than a DenseMap so that pointers to the map's value_type (which are used by ValueInfo) are not invalidated by insertion. Also it will likely incur less overhead, as the value type is not very small and the size of the map is unknown, resulting in inefficiencies due to repeated insertions and resizing.

Definition at line 159 of file ModuleSummaryIndex.h.

◆ GraphDiffInvBBPair

using llvm::GraphDiffInvBBPair = typedef std::pair<const GraphDiff<BasicBlock *> *, Inverse<BasicBlock *> >

Definition at line 67 of file MemorySSAUpdater.h.

◆ gvsummary_iterator

using llvm::gvsummary_iterator = typedef GlobalValueSummaryMapTy::iterator

Definition at line 873 of file ModuleSummaryIndex.h.

◆ GVSummaryMapTy

Map of global value GUID to its summary, used to identify values defined in a particular module, and provide efficient access to their summary.

Definition at line 882 of file ModuleSummaryIndex.h.

◆ HoistingPointInfo

using llvm::HoistingPointInfo = typedef std::pair<BasicBlock *, SmallVecInsn>

Definition at line 123 of file GVNHoist.cpp.

◆ HoistingPointList

Definition at line 125 of file GVNHoist.cpp.

◆ IndexAttrPair

using llvm::IndexAttrPair = typedef std::pair<unsigned, AttributeSet>

Definition at line 234 of file AttributeImpl.h.

◆ inst_iterator

Definition at line 121 of file InstIterator.h.

◆ inst_range

using llvm::inst_range = typedef iterator_range<inst_iterator>

Definition at line 128 of file InstIterator.h.

◆ interval_part_interval_iterator

Definition at line 245 of file IntervalIterator.h.

◆ InValuesType

using llvm::InValuesType = typedef DenseMap<BasicBlock *, SmallVector<std::pair<VNType, Instruction *>, 2> >

Definition at line 158 of file GVNHoist.cpp.

◆ ListScope

using llvm::ListScope = typedef DelimitedScope<'[', ']'>

Definition at line 384 of file ScopedPrinter.h.

◆ LoadStorePair

using llvm::LoadStorePair = typedef std::pair<Instruction *, Instruction *>

Definition at line 30 of file InstrProfiling.h.

◆ LoopAnalysisManager

The loop analysis manager.

See the documentation for the AnalysisManager template for detail documentation. This typedef serves as a convenient way to refer to this construct in the adaptors and proxies used to integrate this into the larger pass manager infrastructure.

Definition at line 75 of file LoopAnalysisManager.h.

◆ LoopAnalysisManagerFunctionProxy

A proxy from a LoopAnalysisManager to a Function.

Definition at line 79 of file LoopAnalysisManager.h.

◆ LoopPassManager

The Loop pass manager.

See the documentation for the PassManager template for details. It runs a sequence of Loop passes over each Loop that the manager is run over. This typedef serves as a convenient way to refer to this construct.

Definition at line 80 of file LoopPassManager.h.

◆ LoopToScevMapT

using llvm::LoopToScevMapT = typedef DenseMap<const Loop *, const SCEV *>

Definition at line 817 of file ScalarEvolutionExpressions.h.

◆ memoryaccess_def_iterator

Definition at line 131 of file MemorySSA.h.

◆ MemoryAccessPair

using llvm::MemoryAccessPair = typedef std::pair<MemoryAccess *, MemoryLocation>

Definition at line 1073 of file MemorySSA.h.

◆ ModuleAnalysisManager

Convenience typedef for the Module analysis manager.

Definition at line 1020 of file PassManager.h.

◆ ModuleAnalysisManagerCGSCCProxy

A proxy from a ModuleAnalysisManager to an SCC.

Definition at line 212 of file CGSCCPassManager.h.

◆ ModuleAnalysisManagerFunctionProxy

Provide the ModuleAnalysisManager to Function proxy.

Definition at line 1255 of file PassManager.h.

◆ ModuleHash

using llvm::ModuleHash = typedef std::array<uint32_t, 5>

160 bits SHA1

Definition at line 869 of file ModuleSummaryIndex.h.

◆ ModulePassManager

Convenience typedef for a pass manager over modules.

Definition at line 569 of file PassManager.h.

◆ ModulePathStringTableTy

using llvm::ModulePathStringTableTy = typedef StringMap<std::pair<uint64_t, ModuleHash> >

String table to hold/own module path strings, which additionally holds the module ID assigned to each module during the plugin step, as well as a hash of the module.

The StringMap makes a copy of and owns inserted strings.

Definition at line 878 of file ModuleSummaryIndex.h.

◆ NameAndCountAndDurationType

Definition at line 38 of file TimeProfiler.cpp.

◆ NewLoopsMap

using llvm::NewLoopsMap = typedef SmallDenseMap<const Loop *, Loop *, 4>

Definition at line 37 of file UnrollLoop.h.

◆ NormalizePredTy

typedef function_ref<bool(const SCEVAddRecExpr *)> llvm::NormalizePredTy

Definition at line 50 of file ScalarEvolutionNormalization.h.

◆ once_flag

typedef std::once_flag llvm::once_flag

Definition at line 72 of file Threading.h.

◆ OperandBundleDef

Definition at line 1079 of file InstrTypes.h.

◆ OutValuesType

using llvm::OutValuesType = typedef DenseMap<BasicBlock *, SmallVector<CHIArg, 2> >

Definition at line 157 of file GVNHoist.cpp.

◆ PhiToDefMap

using llvm::PhiToDefMap = typedef SmallDenseMap<MemoryPhi *, MemoryAccess *>

Definition at line 65 of file MemorySSAUpdater.h.

◆ PostDomTreeBase

template<typename T >
using llvm::PostDomTreeBase = typedef DominatorTreeBase<T, true>

Definition at line 859 of file GenericDomTree.h.

◆ PostIncLoopSet

typedef SmallPtrSet<const Loop *, 2> llvm::PostIncLoopSet

Definition at line 48 of file ScalarEvolutionNormalization.h.

◆ pred_const_range

using llvm::pred_const_range = typedef iterator_range<const_pred_iterator>

Definition at line 106 of file CFG.h.

◆ pred_iterator

Definition at line 102 of file CFG.h.

◆ pred_range

using llvm::pred_range = typedef iterator_range<pred_iterator>

Definition at line 105 of file CFG.h.

◆ RelocAddrMap

using llvm::RelocAddrMap = typedef DenseMap<uint64_t, RelocAddrEntry>

In place of applying the relocations to the data we've read from disk we use a separate mapping table to the side and checking that at locations in the dwarf where we expect relocated values.

This adds a bit of complexity to the dwarf parsing/extraction at the benefit of not allocating memory for the entire size of the debug info sections.

Definition at line 34 of file DWARFRelocMap.h.

◆ RequireAnalysisLoopPass

template<typename AnalysisT >
using llvm::RequireAnalysisLoopPass = typedef RequireAnalysisPass<AnalysisT, Loop, LoopAnalysisManager, LoopStandardAnalysisResults &, LPMUpdater &>

An alias template to easily name a require analysis loop pass.

Definition at line 100 of file LoopPassManager.h.

◆ ReverseIDFCalculator

Definition at line 56 of file IteratedDominanceFrontier.h.

◆ ScopedCommonHandle

Definition at line 172 of file WindowsSupport.h.

◆ ScopedCryptContext

Definition at line 174 of file WindowsSupport.h.

◆ ScopedFileHandle

Definition at line 173 of file WindowsSupport.h.

◆ ScopedFindHandle

Definition at line 176 of file WindowsSupport.h.

◆ ScopedJobHandle

Definition at line 177 of file WindowsSupport.h.

◆ ScopedRegHandle

Definition at line 175 of file WindowsSupport.h.

◆ SizeOffsetEvalType

using llvm::SizeOffsetEvalType = typedef std::pair<Value *, Value *>

Definition at line 260 of file MemoryBuiltins.h.

◆ SizeOffsetType

using llvm::SizeOffsetType = typedef std::pair<APInt, APInt>

Definition at line 201 of file MemoryBuiltins.h.

◆ SmallVecImplInsn

Definition at line 119 of file GVNHoist.cpp.

◆ SmallVecInsn

Definition at line 118 of file GVNHoist.cpp.

◆ SMTExprRef

using llvm::SMTExprRef = typedef const SMTExpr *

Shared pointer for SMTExprs, used by SMTSolver API.

Definition at line 129 of file SMTAPI.h.

◆ SMTSolverRef

using llvm::SMTSolverRef = typedef std::shared_ptr<SMTSolver>

Shared pointer for SMTSolvers.

Definition at line 440 of file SMTAPI.h.

◆ SMTSortRef

using llvm::SMTSortRef = typedef const SMTSort *

Shared pointer for SMTSorts, used by SMTSolver API.

Definition at line 97 of file SMTAPI.h.

◆ StackSafetyGlobalInfo

using llvm::StackSafetyGlobalInfo = typedef std::map<const GlobalValue *, StackSafetyInfo>

Definition at line 75 of file StackSafetyAnalysis.h.

◆ succ_const_iterator

Definition at line 241 of file CFG.h.

◆ succ_const_range

using llvm::succ_const_range = typedef iterator_range<succ_const_iterator>

Definition at line 243 of file CFG.h.

◆ succ_iterator

Definition at line 240 of file CFG.h.

◆ succ_range

using llvm::succ_range = typedef iterator_range<succ_iterator>

Definition at line 242 of file CFG.h.

◆ SummaryEntryVector

using llvm::SummaryEntryVector = typedef std::vector<ProfileSummaryEntry>

Definition at line 41 of file ProfileSummary.h.

◆ thread

typedef std::thread llvm::thread

Definition at line 26 of file thread.h.

◆ TrackingMDNodeRef

Definition at line 141 of file TrackingMDRef.h.

◆ TrackingValueAsMetadataRef

Definition at line 142 of file TrackingMDRef.h.

◆ TypeIdCompatibleVtableInfo

List of vtable definitions decorated by a particular type identifier, and their corresponding offsets in that type identifier's metadata.

Note that each type identifier may be compatible with multiple vtables, due to inheritance, which is why this is a vector.

Definition at line 910 of file ModuleSummaryIndex.h.

◆ TypeIdSummaryMapTy

using llvm::TypeIdSummaryMapTy = typedef std::multimap<GlobalValue::GUID, std::pair<std::string, TypeIdSummary> >

Map of a type GUID to type id string and summary (multimap used in case of GUID conflicts).

Definition at line 886 of file ModuleSummaryIndex.h.

◆ uint24_t

using llvm::uint24_t = typedef Uint24

Definition at line 32 of file DataExtractor.h.

◆ unique_value

using llvm::unique_value = typedef std::unique_ptr<Value, ValueDeleter>

Use this instead of std::unique_ptr<Value> or std::unique_ptr<Instruction>.

Those don't work because Value and Instruction's destructors are protected, aren't virtual, and won't destroy the complete object.

Definition at line 703 of file Value.h.

◆ UseListOrderStack

using llvm::UseListOrderStack = typedef std::vector<UseListOrder>

Definition at line 39 of file UseListOrder.h.

◆ UTF16

typedef unsigned short llvm::UTF16

Definition at line 110 of file ConvertUTF.h.

◆ UTF32

typedef unsigned int llvm::UTF32

Definition at line 109 of file ConvertUTF.h.

◆ UTF8

Definition at line 111 of file ConvertUTF.h.

◆ Value2VPValueTy

typedef DenseMap<Value *, VPValue *> llvm::Value2VPValueTy

Definition at line 124 of file VPlanValue.h.

◆ ValueName

using llvm::ValueName = typedef StringMapEntry<Value *>

Definition at line 53 of file Value.h.

◆ ValueToValueMap

using llvm::ValueToValueMap = typedef DenseMap<const Value *, Value *>

Definition at line 785 of file ScalarEvolutionExpressions.h.

◆ ValueToValueMapTy

Definition at line 64 of file MemorySSAUpdater.h.

◆ VNtoInsns

using llvm::VNtoInsns = typedef DenseMap<VNType, SmallVector<Instruction *, 4> >

Definition at line 130 of file GVNHoist.cpp.

◆ VNType

using llvm::VNType = typedef std::pair<unsigned, unsigned>

Definition at line 128 of file GVNHoist.cpp.

◆ VPDominatorTree

Template specialization of the standard LLVM dominator tree utility for VPBlockBases.

Definition at line 26 of file VPlanDominatorTree.h.

◆ VPDomTreeNode

Definition at line 28 of file VPlanDominatorTree.h.

◆ VPlanPtr

using llvm::VPlanPtr = typedef std::unique_ptr<VPlan>

Definition at line 75 of file VPlan.h.

◆ VPLoopInfo

VPLoopInfo provides analysis of natural loop for VPBlockBase-based Hierarchical CFG.

It is a specialization of LoopInfoBase class.

Definition at line 40 of file VPlanLoopInfo.h.

◆ VPValue2ValueTy

typedef DenseMap<VPValue *, Value *> llvm::VPValue2ValueTy

Definition at line 125 of file VPlanValue.h.

◆ VTableFuncList

using llvm::VTableFuncList = typedef std::vector<VirtFuncOffset>

List of functions referenced by a particular vtable definition.

Definition at line 736 of file ModuleSummaryIndex.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
kSanitizerStatKindBits 

Definition at line 22 of file SanitizerStats.h.

◆ anonymous enum

anonymous enum : unsigned
Enumerator
InvalidVN 

Definition at line 163 of file GVNHoist.cpp.

◆ anonymous enum

anonymous enum : unsigned
Enumerator
INVALID_MEMORYACCESS_ID 

Definition at line 124 of file MemorySSA.h.

◆ AliasResult

enum llvm::AliasResult : uint8_t

The possible results of an alias query.

These results are always computed between two MemoryLocation objects as a query to some alias analysis.

Note that these are unscoped enumerations because we would like to support implicitly testing a result for the existence of any possible aliasing with a conversion to bool, but an "enum class" doesn't support this. The canonical names from the literature are suffixed and unique anyways, and so they serve as global constants in LLVM for these results.

See docs/AliasAnalysis.html for more information on the specific meanings of these values.

Enumerator
NoAlias 

The two locations do not alias at all.

This value is arranged to convert to false, while all other values convert to true. This allows a boolean context to convert the result to a binary flag indicating whether there is the possibility of aliasing.

MayAlias 

The two locations may or may not alias. This is the least precise result.

PartialAlias 

The two locations alias, but only due to a partial overlap.

MustAlias 

The two locations precisely alias each other.

Definition at line 78 of file AliasAnalysis.h.

◆ AlignStyle

enum class llvm::AlignStyle
strong
Enumerator
Left 
Center 
Right 

Definition at line 17 of file FormatCommon.h.

◆ AlignTypeEnum

Enum used to categorize the alignment types stored by LayoutAlignElem.

Enumerator
INVALID_ALIGN 
INTEGER_ALIGN 
VECTOR_ALIGN 
FLOAT_ALIGN 
AGGREGATE_ALIGN 

Definition at line 50 of file DataLayout.h.

◆ AtomicOrdering

enum class llvm::AtomicOrdering
strong

Atomic ordering for LLVM's memory model.

C++ defines ordering as a lattice. LLVM supplements this with NotAtomic and Unordered, which are both below the C++ orders.

not_atomic-->unordered-->relaxed-->release------------—>acq_rel-->seq_cst -->consume-->acquire–/

Enumerator
NotAtomic 
Unordered 
Monotonic 
Acquire 
Release 
AcquireRelease 
SequentiallyConsistent 

Definition at line 56 of file AtomicOrdering.h.

◆ AtomicOrderingCABI

enum class llvm::AtomicOrderingCABI
strong

Atomic ordering for C11 / C++11's memody models.

These values cannot change because they are shared with standard library implementations as well as with other compilers.

Enumerator
relaxed 
consume 
acquire 
release 
acq_rel 
seq_cst 

Definition at line 28 of file AtomicOrdering.h.

◆ BinaryStreamFlags

Enumerator
BSF_None 
BSF_Write 
BSF_Append 

Definition at line 21 of file BinaryStream.h.

◆ CfiFunctionLinkage

The type of CFI jumptable needed for a function.

Enumerator
CFL_Definition 
CFL_Declaration 
CFL_WeakDeclaration 

Definition at line 25 of file TypeMetadataUtils.h.

◆ ChangeStatus

enum class llvm::ChangeStatus
strong

Simple enum class that forces the status to be spelled out explicitly.

{

Enumerator
CHANGED 
UNCHANGED 

Definition at line 114 of file Attributor.h.

◆ ConversionFlags

Enumerator
strictConversion 
lenientConversion 

Definition at line 133 of file ConvertUTF.h.

◆ ConversionResult

Enumerator
conversionOK 
sourceExhausted 
targetExhausted 
sourceIllegal 

Definition at line 126 of file ConvertUTF.h.

◆ DiagnosticKind

Defines the different supported kind of a diagnostic.

This enum should be extended with a new ID for each added concrete subclass.

Enumerator
DK_InlineAsm 
DK_ResourceLimit 
DK_StackSize 
DK_Linker 
DK_DebugMetadataVersion 
DK_DebugMetadataInvalid 
DK_ISelFallback 
DK_SampleProfile 
DK_OptimizationRemark 
DK_OptimizationRemarkMissed 
DK_OptimizationRemarkAnalysis 
DK_OptimizationRemarkAnalysisFPCommute 
DK_OptimizationRemarkAnalysisAliasing 
DK_OptimizationFailure 
DK_FirstRemark 
DK_LastRemark 
DK_MachineOptimizationRemark 
DK_MachineOptimizationRemarkMissed 
DK_MachineOptimizationRemarkAnalysis 
DK_FirstMachineRemark 
DK_LastMachineRemark 
DK_MIRParser 
DK_PGOProfile 
DK_Unsupported 
DK_FirstPluginKind 

Definition at line 53 of file DiagnosticInfo.h.

◆ DiagnosticSeverity

Defines the different supported severity of a diagnostic.

Enumerator
DS_Error 
DS_Warning 
DS_Remark 
DS_Note 

Definition at line 42 of file DiagnosticInfo.h.

◆ DIDumpType

Selects which debug sections get dumped.

Enumerator
DIDT_Null 
DIDT_All 
DIDT_UUID 

Definition at line 155 of file DIContext.h.

◆ DIDumpTypeCounter

This is just a helper to programmatically construct DIDumpType.

Enumerator
DIDT_ID_UUID 
DIDT_ID_Count 

Definition at line 144 of file DIContext.h.

◆ DINameKind

enum class llvm::DINameKind
strong

A DINameKind is passed to name search methods to specify a preference regarding the type of name resolution the caller wants.

Enumerator
None 
ShortName 
LinkageName 

Definition at line 127 of file DIContext.h.

◆ DWARFSectionKind

Enumerator
DW_SECT_INFO 
DW_SECT_TYPES 
DW_SECT_ABBREV 
DW_SECT_LINE 
DW_SECT_LOC 
DW_SECT_STR_OFFSETS 
DW_SECT_MACINFO 
DW_SECT_MACRO 

Definition at line 22 of file DWARFUnitIndex.h.

◆ EHPersonality

enum class llvm::EHPersonality
strong
Enumerator
Unknown 
GNU_Ada 
GNU_C 
GNU_C_SjLj 
GNU_CXX 
GNU_CXX_SjLj 
GNU_ObjC 
MSVC_X86SEH 
MSVC_Win64SEH 
MSVC_CXX 
CoreCLR 
Rust 
Wasm_CXX 

Definition at line 22 of file EHPersonalities.h.

◆ errc

enum class llvm::errc
strong
Enumerator
argument_list_too_long 
argument_out_of_domain 
bad_address 
bad_file_descriptor 
broken_pipe 
device_or_resource_busy 
directory_not_empty 
executable_format_error 
file_exists 
file_too_large 
filename_too_long 
function_not_supported 
illegal_byte_sequence 
inappropriate_io_control_operation 
interrupted 
invalid_argument 
invalid_seek 
io_error 
is_a_directory 
no_child_process 
no_lock_available 
no_space_on_device 
no_such_device_or_address 
no_such_device 
no_such_file_or_directory 
no_such_process 
not_a_directory 
not_enough_memory 
not_supported 
operation_not_permitted 
permission_denied 
read_only_file_system 
resource_deadlock_would_occur 
resource_unavailable_try_again 
result_out_of_range 
too_many_files_open_in_system 
too_many_files_open 
too_many_links 

Definition at line 35 of file Errc.h.

◆ ErrorPolicy

enum class llvm::ErrorPolicy
strong

Used as a return value for a error callback passed to DWARF context.

Callback should return Halt if client application wants to stop object parsing, or should return Continue otherwise.

Enumerator
Halt 
Continue 

Definition at line 53 of file DWARFContext.h.

◆ FloatStyle

enum class llvm::FloatStyle
strong
Enumerator
Exponent 
ExponentUpper 
Fixed 
Percent 

Definition at line 18 of file NativeFormatting.h.

◆ FunctionModRefBehavior

Summary of how a function affects memory in the program.

Loads from constant globals are not considered memory accesses for this interface. Also, functions may freely modify stack space local to their invocation without having to report it through these interfaces.

Enumerator
FMRB_DoesNotAccessMemory 

This function does not perform any non-local loads or stores to memory.

This property corresponds to the GCC 'const' attribute. This property corresponds to the LLVM IR 'readnone' attribute. This property corresponds to the IntrNoMem LLVM intrinsic flag.

FMRB_OnlyReadsArgumentPointees 

The only memory references in this function (if it has any) are non-volatile loads from objects pointed to by its pointer-typed arguments, with arbitrary offsets.

This property corresponds to the IntrReadArgMem LLVM intrinsic flag.

FMRB_OnlyAccessesArgumentPointees 

The only memory references in this function (if it has any) are non-volatile loads and stores from objects pointed to by its pointer-typed arguments, with arbitrary offsets.

This property corresponds to the IntrArgMemOnly LLVM intrinsic flag.

FMRB_OnlyAccessesInaccessibleMem 

The only memory references in this function (if it has any) are references of memory that is otherwise inaccessible via LLVM IR.

This property corresponds to the LLVM IR inaccessiblememonly attribute.

FMRB_OnlyAccessesInaccessibleOrArgMem 

The function may perform non-volatile loads and stores of objects pointed to by its pointer-typed arguments, with arbitrary offsets, and it may also perform loads and stores of memory that is otherwise inaccessible via LLVM IR.

This property corresponds to the LLVM IR inaccessiblemem_or_argmemonly attribute.

FMRB_OnlyReadsMemory 

This function does not perform any non-local stores or volatile loads, but may read from any memory location.

This property corresponds to the GCC 'pure' attribute. This property corresponds to the LLVM IR 'readonly' attribute. This property corresponds to the IntrReadMem LLVM intrinsic flag.

FMRB_DoesNotReadMemory 
FMRB_UnknownModRefBehavior 

This indicates that the function could not be classified into one of the behaviors above.

Definition at line 216 of file AliasAnalysis.h.

◆ FunctionModRefLocation

The locations at which a function might access memory.

These are primarily used in conjunction with the AccessKind bits to describe both the nature of access and the locations of access for a function call.

Enumerator
FMRL_Nowhere 

Base case is no access to memory.

FMRL_ArgumentPointees 

Access to memory via argument pointers.

FMRL_InaccessibleMem 

Memory that is inaccessible via LLVM IR.

FMRL_Anywhere 

Access to any memory.

Definition at line 200 of file AliasAnalysis.h.

◆ GVDAGType

Enumerator
GVDT_None 
GVDT_Fraction 
GVDT_Integer 
GVDT_Count 

Definition at line 1364 of file BlockFrequencyInfoImpl.h.

◆ HexPrintStyle

enum class llvm::HexPrintStyle
strong
Enumerator
Upper 
Lower 
PrefixUpper 
PrefixLower 

Definition at line 23 of file NativeFormatting.h.

◆ HighlightColor

enum class llvm::HighlightColor
strong
Enumerator
Address 
String 
Tag 
Attribute 
Enumerator 
Macro 
Error 
Warning 
Note 
Remark 

Definition at line 22 of file WithColor.h.

◆ IntegerStyle

enum class llvm::IntegerStyle
strong
Enumerator
Integer 
Number 

Definition at line 19 of file NativeFormatting.h.

◆ LibFunc

Enumerator
NumLibFuncs 

Definition at line 33 of file TargetLibraryInfo.h.

◆ LLVMConstants

Enumerator
DEBUG_METADATA_VERSION 

Definition at line 50 of file Metadata.h.

◆ LoopUnrollResult

enum class llvm::LoopUnrollResult
strong

Represents the result of a UnrollLoop invocation.

Enumerator
Unmodified 

The loop was not modified.

PartiallyUnrolled 

The loop was partially unrolled – we still have a loop, but with a smaller trip count.

We may also have emitted epilogue loop if the loop had a non-constant trip count.

FullyUnrolled 

The loop was fully unrolled into straight-line code.

We no longer have any back-edges.

Definition at line 53 of file UnrollLoop.h.

◆ MemoryAccessKind

The three kinds of memory access relevant to 'readonly' and 'readnone' attributes.

Enumerator
MAK_ReadNone 
MAK_ReadOnly 
MAK_MayWrite 
MAK_WriteOnly 

Definition at line 31 of file FunctionAttrs.h.

◆ ModRefInfo

enum class llvm::ModRefInfo : uint8_t
strong

Flags indicating whether a memory access modifies or references memory.

This is no access at all, a modification, a reference, or both a modification and a reference. These are specifically structured such that they form a three bit matrix and bit-tests for 'mod' or 'ref' or 'must' work with any of the possible values.

Enumerator
Must 

Must is provided for completeness, but no routines will return only Must today.

See definition of Must below.

MustRef 

The access may reference the value stored in memory, a mustAlias relation was found, and no mayAlias or partialAlias found.

MustMod 

The access may modify the value stored in memory, a mustAlias relation was found, and no mayAlias or partialAlias found.

MustModRef 

The access may reference, modify or both the value stored in memory, a mustAlias relation was found, and no mayAlias or partialAlias found.

NoModRef 

The access neither references nor modifies the value stored in memory.

Ref 

The access may reference the value stored in memory.

Mod 

The access may modify the value stored in memory.

ModRef 

The access may reference and may modify the value stored in memory.

Definition at line 102 of file AliasAnalysis.h.

◆ OverflowResult

enum class llvm::OverflowResult
strong
Enumerator
AlwaysOverflowsLow 

Always overflows in the direction of signed/unsigned min value.

AlwaysOverflowsHigh 

Always overflows in the direction of signed/unsigned max value.

MayOverflow 

May or may not overflow.

NeverOverflows 

Never overflows.

Definition at line 426 of file ValueTracking.h.

◆ PassDebuggingString

Enumerator
EXECUTION_MSG 
MODIFICATION_MSG 
FREEING_MSG 
ON_BASICBLOCK_MSG 
ON_FUNCTION_MSG 
ON_MODULE_MSG 
ON_REGION_MSG 
ON_LOOP_MSG 
ON_CG_MSG 

Definition at line 102 of file LegacyPassManagers.h.

◆ PassSummaryAction

enum class llvm::PassSummaryAction
strong

What to do with the summary when running passes that operate on it.

Enumerator
None 

Do nothing.

Import 

Import information from summary.

Export 

Export information to summary.

Definition at line 227 of file IPO.h.

◆ PGOViewCountsType

Enumerator
PGOVCT_None 
PGOVCT_Graph 
PGOVCT_Text 

Definition at line 33 of file BlockFrequencyInfo.h.

◆ PredicateType

Enumerator
PT_Branch 
PT_Assume 
PT_Switch 

Definition at line 95 of file PredicateInfo.h.

◆ PrevailingType

enum class llvm::PrevailingType
strong

PrevailingType enum used as a return type of callback passed to computeDeadSymbols.

Yes and No values used when status explicitly set by symbols resolution, otherwise status is Unknown.

Enumerator
Yes 
No 
Unknown 

Definition at line 166 of file FunctionImport.h.

◆ RemapFlags

These are flags that the value mapping APIs allow.

Enumerator
RF_None 
RF_NoModuleLevelChanges 

If this flag is set, the remapper knows that only local values within a function (such as an instruction or argument) are mapped, not global values like functions and global metadata.

RF_IgnoreMissingLocals 

If this flag is set, the remapper ignores missing function-local entries (Argument, Instruction, BasicBlock) that are not in the value map.

If it is unset, it aborts if an operand is asked to be remapped which doesn't exist in the mapping.

There are no such assertions in MapValue(), whose results are almost unchanged by this flag. This flag mainly changes the assertion behaviour in RemapInstruction().

Since an Instruction's metadata operands (even that point to SSA values) aren't guaranteed to be dominated by their definitions, MapMetadata will return "!{}" instead of "null" for LocalAsMetadata instances whose SSA values are unmapped when this flag is set. Otherwise, MapValue() completely ignores this flag.

MapMetadata() always ignores this flag.

RF_MoveDistinctMDs 

Instruct the remapper to move distinct metadata instead of duplicating it when there are module-level changes.

RF_NullMapMissingGlobalValues 

Any global values not in value map are mapped to null instead of mapping to self.

Illegal if RF_IgnoreMissingLocals is also set.

Definition at line 66 of file ValueMapper.h.

◆ ReplacementType

enum class llvm::ReplacementType
strong
Enumerator
Empty 
Format 
Literal 

Definition at line 44 of file FormatVariadic.h.

◆ SanitizerStatKind

Enumerator
SanStat_CFI_VCall 
SanStat_CFI_NVCall 
SanStat_CFI_DerivedCast 
SanStat_CFI_UnrelatedCast 
SanStat_CFI_ICall 

Definition at line 24 of file SanitizerStats.h.

◆ SCEVTypes

Enumerator
scConstant 
scTruncate 
scZeroExtend 
scSignExtend 
scAddExpr 
scMulExpr 
scUDivExpr 
scAddRecExpr 
scUMaxExpr 
scSMaxExpr 
scUMinExpr 
scSMinExpr 
scUnknown 
scCouldNotCompute 

Definition at line 38 of file ScalarEvolutionExpressions.h.

◆ SelectPatternFlavor

Specific patterns of select instructions we can match.

Enumerator
SPF_UNKNOWN 
SPF_SMIN 
SPF_UMIN 

Signed minimum.

SPF_SMAX 

Unsigned minimum.

SPF_UMAX 

Signed maximum.

SPF_FMINNUM 

Unsigned maximum.

SPF_FMAXNUM 

Floating point minnum.

SPF_ABS 

Floating point maxnum.

SPF_NABS 

Absolute value.

Negated absolute value

Definition at line 550 of file ValueTracking.h.

◆ SelectPatternNaNBehavior

Behavior when a floating point min/max is given one NaN and one non-NaN as input.

Enumerator
SPNB_NA 
SPNB_RETURNS_NAN 

NaN behavior not applicable.

SPNB_RETURNS_OTHER 

Given one NaN input, returns the NaN.

SPNB_RETURNS_ANY 

Given one NaN input, returns the non-NaN.

Given one NaN input, can return either (or it has been determined that no operands can be NaN).

Definition at line 564 of file ValueTracking.h.

◆ SetThreadPriorityResult

enum class llvm::SetThreadPriorityResult
strong

If priority is Background tries to lower current threads priority such that it does not affect foreground tasks significantly.

Can be used for long-running, latency-insensitive tasks to make sure cpu is not hogged by this task. If the priority is default tries to restore current threads priority to default scheduling priority.

Enumerator
FAILURE 
SUCCESS 

Definition at line 181 of file Threading.h.

◆ StatepointFlags

enum class llvm::StatepointFlags
strong

The statepoint intrinsic accepts a set of flags as its third argument.

Valid values come out of this set.

Enumerator
None 
GCTransition 

Indicates that this statepoint is a transition from GC-aware code to code that is not GC-aware.

DeoptLiveIn 

Mark the deopt arguments associated with the statepoint as only being "live-in".

By default, deopt arguments are "live-through". "live-through" requires that they the value be live on entry, on exit, and at any point during the call. "live-in" only requires the value be available at the start of the call. In particular, "live-in" values can be placed in unused argument registers or other non-callee saved registers.

MaskAll 

A bitmask that includes all valid flags.

Definition at line 40 of file Statepoint.h.

◆ stream_error_code

enum class llvm::stream_error_code
strong
Enumerator
unspecified 
stream_too_short 
invalid_array_size 
invalid_offset 
filesystem_error 

Definition at line 18 of file BinaryStreamError.h.

◆ ThreadPriority

enum class llvm::ThreadPriority
strong
Enumerator
Background 
Default 

Definition at line 171 of file Threading.h.

◆ TransformationMode

The mode sets how eager a transformation should be applied.

Enumerator
TM_Unspecified 

The pass can use heuristics to determine whether a transformation should be applied.

TM_Enable 

The transformation should be applied without considering a cost model.

TM_Disable 

The transformation should not be applied.

TM_Force 

Force is a flag and should not be used alone.

TM_ForcedByUser 

The transformation was directed by the user, e.g.

by a #pragma in the source code. If the transformation could not be applied, a warning should be emitted.

TM_SuppressedByUser 

The transformation must not be applied.

For instance, #pragma clang loop unroll(disable) explicitly forbids any unrolling to take place. Unlike general loop metadata, it must not be dropped. Most passes should not behave differently under TM_Disable and TM_SuppressedByUser.

Definition at line 219 of file LoopUtils.h.

◆ ZeroBehavior

The behavior an operation has on an input of 0.

Enumerator
ZB_Undefined 

The returned value is undefined.

ZB_Max 

The returned value is numeric_limits<T>::max()

ZB_Width 

The returned value is numeric_limits<T>::digits.

Definition at line 43 of file MathExtras.h.

Function Documentation

◆ AbsoluteDifference()

template<typename T >
std::enable_if< std::is_unsigned< T >::value, T >::type llvm::AbsoluteDifference ( X,
Y 
)

Subtract two unsigned integers, X and Y, of type T and return the absolute value of the result.

Definition at line 771 of file MathExtras.h.

References X(), and Y().

Referenced by llvm::msf::MappedBlockStream::readBytes().

◆ addClonedBlockToLoopInfo()

const Loop * llvm::addClonedBlockToLoopInfo ( BasicBlock OriginalBB,
BasicBlock ClonedBB,
LoopInfo LI,
NewLoopsMap NewLoops 
)

Adds ClonedBB to LoopInfo, creates a new loop for ClonedBB if necessary and adds a mapping from the original loop to the new loop to NewLoops.

Returns nullptr if no new loop was created and a pointer to the original loop OriginalBB was part of otherwise.

Definition at line 131 of file LoopUnroll.cpp.

References llvm::LoopBase< BlockT, LoopT >::addBasicBlockToLoop(), llvm::LoopBase< BlockT, LoopT >::addChildLoop(), llvm::LoopInfoBase< BlockT, LoopT >::addTopLevelLoop(), llvm::LoopInfoBase< BlockT, LoopT >::AllocateLoop(), assert(), llvm::LoopBase< BlockT, LoopT >::getHeader(), llvm::LoopInfoBase< BlockT, LoopT >::getLoopFor(), and llvm::LoopBase< BlockT, LoopT >::getParentLoop().

Referenced by CloneLoopBlocks(), and UnrollLoop().

◆ addCoroutinePassesToExtensionPoints()

void llvm::addCoroutinePassesToExtensionPoints ( PassManagerBuilder Builder)

◆ addInnerLoopsToHeadersMap()

template<class BlockT , class LoopT >
void llvm::addInnerLoopsToHeadersMap ( DenseMap< BlockT *, const LoopT * > &  LoopHeaders,
const LoopInfoBase< BlockT, LoopT > &  LI,
const LoopT &  L 
)

◆ addNodeToInterval() [1/2]

void llvm::addNodeToInterval ( Interval Int,
BasicBlock BB 
)
inline

Definition at line 72 of file IntervalIterator.h.

◆ addNodeToInterval() [2/2]

void llvm::addNodeToInterval ( Interval Int,
Interval I 
)
inline

Definition at line 82 of file IntervalIterator.h.

References I.

◆ AddOne()

static Constant * llvm::AddOne ( Constant C)
inlinestatic

◆ addStringMetadataToLoop()

void llvm::addStringMetadataToLoop ( Loop TheLoop,
const char MDString,
unsigned  V = 0 
)

◆ alignAddr()

uintptr_t llvm::alignAddr ( const void *  Addr,
size_t  Alignment 
)
inline

Aligns Addr to Alignment bytes, rounding up.

Alignment should be a power of two. This method rounds up, so alignAddr(7, 4) == 8 and alignAddr(8, 4) == 8.

Definition at line 627 of file MathExtras.h.

References assert(), and isPowerOf2_64().

Referenced by alignmentAdjustment(), llvm::BumpPtrAllocatorImpl< AllocatorT, SlabSize, SizeThreshold >::Allocate(), llvm::SpecificBumpPtrAllocator< T >::DestroyAll(), and llvm::trailing_objects_internal::TrailingObjectsImpl< Align, BaseTy, TopTrailingObj, PrevTy, NextTy, MoreTys... >::getTrailingObjectsImpl().

◆ alignDown()

uint64_t llvm::alignDown ( uint64_t  Value,
uint64_t  Align,
uint64_t  Skew = 0 
)
inline

Returns the largest uint64_t less than or equal to Value and is Skew mod Align.

Align must be non-zero

Definition at line 722 of file MathExtras.h.

References assert().

◆ alignmentAdjustment()

size_t llvm::alignmentAdjustment ( const void *  Ptr,
size_t  Alignment 
)
inline

Returns the necessary adjustment for aligning Ptr to Alignment bytes, rounding up.

Definition at line 638 of file MathExtras.h.

References alignAddr().

Referenced by llvm::BumpPtrAllocatorImpl< AllocatorT, SlabSize, SizeThreshold >::Allocate(), llvm::FixedStreamArray< T >::operator[](), and llvm::BinaryStreamReader::readArray().

◆ alignTo() [1/2]

template<uint64_t Align>
constexpr uint64_t llvm::alignTo ( uint64_t  Value)
inlineconstexpr

Returns the next integer (mod 2**64) that is greater than or equal to Value and is a multiple of Align.

Align must be non-zero.

Definition at line 697 of file MathExtras.h.

◆ alignTo() [2/2]

uint64_t llvm::alignTo ( uint64_t  Value,
uint64_t  Align,
uint64_t  Skew = 0 
)
inline

Returns the next integer (mod 2**64) that is greater than or equal to Value and is a multiple of Align.

Align must be non-zero.

If non-zero Skew is specified, the return value will be a minimal integer that is greater than or equal to Value and equal to Align * N + Skew for some integer N. If Skew is larger than Align, its value is adjusted to 'Skew mod Align'.

Examples:

alignTo(5, 8) = 8
alignTo(17, 8) = 24
alignTo(~0LL, 8) = 0
alignTo(321, 255) = 510
alignTo(5, 8, 7) = 7
alignTo(17, 8, 1) = 17
alignTo(~0LL, 8, 3) = 3
alignTo(321, 255, 42) = 552
uint64_t alignTo(uint64_t Value, uint64_t Align, uint64_t Skew=0)
Returns the next integer (mod 2**64) that is greater than or equal to Value and is a multiple of Alig...
Definition: MathExtras.h:689

Definition at line 689 of file MathExtras.h.

References assert().

Referenced by addByteCountSuffix(), llvm::codeview::DebugChecksumsSubsection::addChecksum(), llvm::trailing_objects_internal::TrailingObjectsImpl< Align, BaseTy, TopTrailingObj, PrevTy, NextTy, MoreTys... >::additionalSizeToAllocImpl(), calculateDiSymbolStreamSize(), llvm::codeview::DebugSubsectionRecordBuilder::calculateSerializedLength(), llvm::pdb::DbiModuleDescriptorBuilder::calculateSerializedLength(), llvm::pdb::HashTable< ValueT >::calculateSerializedLength(), llvm::VNCoercion::canCoerceMustAliasedValueToLoad(), llvm::codeview::DebugSubsectionRecordBuilder::commit(), divideCeil(), llvm::DWARFDebugNames::Header::extract(), llvm::WritableMemoryBuffer::getNewUninitMemBuffer(), llvm::pdb::DbiModuleDescriptor::getRecordLength(), llvm::DataLayout::getTypeAllocSize(), OffsetToAlignment(), llvm::MDNode::operator delete(), llvm::MDNode::operator new(), llvm::VarStreamArrayExtractor< codeview::DebugSubsectionRecord >::operator()(), llvm::raw_ostream::operator<<(), pad(), llvm::BinaryStreamReader::padToAlignment(), llvm::BinaryStreamWriter::padToAlignment(), readGSIHashBuckets(), llvm::StrOffsetsContributionDescriptor::validateContributionSize(), VarAndRedzoneSize(), and llvm::pdb::writeSparseBitVector().

◆ allocate_buffer()

void * llvm::allocate_buffer ( size_t  Size,
size_t  Alignment 
)
inline

Allocate a buffer of memory with the given size and alignment.

When the compiler supports aligned operator new, this will use it to to handle even over-aligned allocations.

However, this doesn't make any attempt to leverage the fancier techniques like posix_memalign due to portability. It is mostly intended to allow compatibility with platforms that, after aligned allocation was added, use reduced default alignment.

Definition at line 541 of file Compiler.h.

◆ appendToCompilerUsed()

void llvm::appendToCompilerUsed ( Module M,
ArrayRef< GlobalValue * >  Values 
)

Adds global values to the llvm.compiler.used list.

Definition at line 105 of file ModuleUtils.cpp.

References appendToUsedList().

Referenced by updateCompilerUsed().

◆ appendToGlobalCtors()

void llvm::appendToGlobalCtors ( Module M,
Function F,
int  Priority,
Constant Data = nullptr 
)

Append F to the list of global ctors of module M with the given Priority.

This wraps the function in the appropriate structure and stores it along side other global constructors. For details see http://llvm.org/docs/LangRef.html#intg_global_ctors

Definition at line 63 of file ModuleUtils.cpp.

References appendToGlobalArray(), and F.

Referenced by llvm::SanitizerStatReport::finish(), and getOrCreateInitFunction().

◆ appendToGlobalDtors()

void llvm::appendToGlobalDtors ( Module M,
Function F,
int  Priority,
Constant Data = nullptr 
)

Same as appendToGlobalCtors(), but for global dtors.

Definition at line 67 of file ModuleUtils.cpp.

References appendToGlobalArray(), and F.

◆ appendToUsed()

void llvm::appendToUsed ( Module M,
ArrayRef< GlobalValue * >  Values 
)

Adds global values to the llvm.used list.

Definition at line 101 of file ModuleUtils.cpp.

References appendToUsedList().

◆ ApproximateLoopSize()

unsigned llvm::ApproximateLoopSize ( const Loop L,
unsigned NumCalls,
bool NotDuplicatable,
bool Convergent,
const TargetTransformInfo TTI,
const SmallPtrSetImpl< const Value * > &  EphValues,
unsigned  BEInsns 
)

◆ BitsToDouble()

double llvm::BitsToDouble ( uint64_t  Bits)
inline

This function takes a 64-bit integer and returns the bit equivalent double.

Definition at line 577 of file MathExtras.h.

◆ BitsToFloat()

float llvm::BitsToFloat ( uint32_t  Bits)
inline

This function takes a 32-bit integer and returns the bit equivalent float.

Definition at line 585 of file MathExtras.h.

References F.

◆ buildModuleSummaryIndex()

ModuleSummaryIndex llvm::buildModuleSummaryIndex ( const Module M,
std::function< BlockFrequencyInfo *(const Function &F)>  GetBFICallback,
ProfileSummaryInfo PSI 
)

◆ BuryPointer() [1/2]

void llvm::BuryPointer ( const void *  Ptr)

Definition at line 15 of file BuryPointer.cpp.

References Idx, and LLVM_ATTRIBUTE_UNUSED.

Referenced by BuryPointer().

◆ BuryPointer() [2/2]

template<typename T >
void llvm::BuryPointer ( std::unique_ptr< T >  Ptr)

Definition at line 23 of file BuryPointer.h.

References BuryPointer().

◆ bypassSlowDivision()

bool llvm::bypassSlowDivision ( BasicBlock BB,
const DenseMap< unsigned int, unsigned int > &  BypassWidth 
)

This optimization identifies DIV instructions in a BB that can be profitably bypassed and carried out with a shorter, faster divide.

This optimization may add basic blocks immediately after BB; for obvious reasons, you shouldn't pass those blocks to bypassSlowDivision.

◆ ByteSwap_16()

uint16_t llvm::ByteSwap_16 ( uint16_t  Value)
inline

Return a byte-swapped representation of the 16-bit argument.

Definition at line 438 of file MathExtras.h.

References llvm::sys::SwapByteOrder_16().

◆ ByteSwap_32()

uint32_t llvm::ByteSwap_32 ( uint32_t  Value)
inline

Return a byte-swapped representation of the 32-bit argument.

Definition at line 443 of file MathExtras.h.

References llvm::sys::SwapByteOrder_32().

◆ ByteSwap_64()

uint64_t llvm::ByteSwap_64 ( uint64_t  Value)
inline

Return a byte-swapped representation of the 64-bit argument.

Definition at line 448 of file MathExtras.h.

References llvm::sys::SwapByteOrder_64().

◆ c_str()

template<class T >
SmallVectorImpl< T >::const_pointer llvm::c_str ( SmallVectorImpl< T > &  str)

Definition at line 184 of file WindowsSupport.h.

◆ calculateCountScale()

static uint64_t llvm::calculateCountScale ( uint64_t  MaxCount)
inlinestatic

Calculate what to divide by to scale counts.

Given the maximum count, calculate a divisor that will scale all the weights to strictly less than std::numeric_limits<uint32_t>::max().

Definition at line 192 of file Instrumentation.h.

Referenced by llvm::pgo::promoteIndirectCall(), and setProfMetadata().

◆ call_once()

template<typename Function , typename... Args>
void llvm::call_once ( once_flag flag,
Function &&  F,
Args &&...  ArgList 
)

Execute the function specified as a parameter once.

Typical usage:

void foo() {...};
...
static once_flag flag;
call_once(flag, foo);
std::once_flag once_flag
Definition: Threading.h:72
void call_once(once_flag &flag, Function &&F, Args &&... ArgList)
Execute the function specified as a parameter once.
Definition: Threading.h:102
Parameters
flagFlag used for tracking whether or not this has run.
FFunction to call once.

Definition at line 102 of file Threading.h.

References llvm::sys::CompareAndSwap(), F, llvm::sys::MemoryFence(), TsanHappensAfter, TsanHappensBefore, TsanIgnoreWritesBegin, TsanIgnoreWritesEnd, and llvm::sys::Wait().

Referenced by getManagedStaticMutex().

◆ callsGCLeafFunction()

bool llvm::callsGCLeafFunction ( const CallBase Call,
const TargetLibraryInfo TLI 
)

Return true if this call calls a gc leaf function.

A leaf function is a function that does not safepoint the thread during its execution. During a call or invoke to such a function, the callers stack does not have to be made parseable.

Most passes can and should ignore this information, and it is only used during lowering by the GC infrastructure.

Definition at line 2480 of file Local.cpp.

References F, llvm::TargetLibraryInfo::getLibFunc(), and llvm::TargetLibraryInfo::has().

Referenced by needsStatepoint(), and llvm::RewriteStatepointsForGC::runOnFunction().

◆ canConstantFoldCallTo()

bool llvm::canConstantFoldCallTo ( const CallBase Call,
const Function F 
)

canConstantFoldCallTo - Return true if its even possible to fold a call to the specified function.

Definition at line 1382 of file ConstantFolding.cpp.

References F, and llvm::Intrinsic::not_intrinsic.

Referenced by CanConstantFold(), and SimplifyCall().

◆ canIfConvertPHINodes()

static bool llvm::canIfConvertPHINodes ( BasicBlock BB)
static

Check whether it is safe to if-convert this phi node.

Phi nodes with constant expressions that can trap are not safe to if convert.

Definition at line 385 of file LoopVectorizationLegality.cpp.

References llvm::BasicBlock::phis().

◆ canImportGlobalVar()

static bool llvm::canImportGlobalVar ( GlobalValueSummary S)
inlinestatic

◆ cannotBeMaxInLoop()

bool llvm::cannotBeMaxInLoop ( const SCEV S,
const Loop L,
ScalarEvolution SE,
bool  Signed 
)

Returns true if S is defined and never is equal to signed/unsigned max.

Definition at line 967 of file LoopUtils.cpp.

References llvm::ScalarEvolution::getConstant(), llvm::SCEV::getType(), llvm::ScalarEvolution::isAvailableAtLoopEntry(), and llvm::ScalarEvolution::isLoopEntryGuardedByCond().

◆ cannotBeMinInLoop()

bool llvm::cannotBeMinInLoop ( const SCEV S,
const Loop L,
ScalarEvolution SE,
bool  Signed 
)

Returns true if S is defined and never is equal to signed/unsigned min.

Definition at line 956 of file LoopUtils.cpp.

References llvm::ScalarEvolution::getConstant(), llvm::SCEV::getType(), llvm::ScalarEvolution::isAvailableAtLoopEntry(), and llvm::ScalarEvolution::isLoopEntryGuardedByCond().

◆ CannotBeNegativeZero()

bool llvm::CannotBeNegativeZero ( const Value V,
const TargetLibraryInfo TLI,
unsigned  Depth = 0 
)

Return true if we can prove that the specified FP value is never equal to -0.0.

NOTE: this function will need to be revisited when we support non-default rounding modes!

Definition at line 2886 of file ValueTracking.cpp.

References CannotBeNegativeZero(), getIntrinsicForCallSite(), llvm::PatternMatch::m_FAdd(), llvm::PatternMatch::m_PosZeroFP(), llvm::PatternMatch::m_Value(), llvm::PatternMatch::match(), and MaxDepth.

Referenced by CannotBeNegativeZero(), cannotBeOrderedLessThanZeroImpl(), foldSelectBinOpIdentity(), SimplifyFAddInst(), SimplifyFSubInst(), and llvm::InstCombiner::visitFSub().

◆ CannotBeOrderedLessThanZero()

bool llvm::CannotBeOrderedLessThanZero ( const Value V,
const TargetLibraryInfo TLI 
)

Return true if we can prove that the specified FP value is either NaN or never less than -0.0.

 NaN --> true
  +0 --> true
  -0 --> true

x > +0 --> true x < -0 --> false

Definition at line 3080 of file ValueTracking.cpp.

References cannotBeOrderedLessThanZeroImpl().

Referenced by isKnownNeverNaN(), and SimplifyFCmpInst().

◆ canPeel()

bool llvm::canPeel ( Loop L)

◆ canReplaceOperandWithVariable()

bool llvm::canReplaceOperandWithVariable ( const Instruction I,
unsigned  OpIdx 
)

Given an instruction, is it legal to set operand OpIdx to a non-constant value?

Definition at line 2866 of file Local.cpp.

References gep_type_begin(), I, and llvm::generic_gep_type_iterator< ItTy >::isStruct().

Referenced by canSinkInstructions().

◆ canSimplifyInvokeNoUnwind()

bool llvm::canSimplifyInvokeNoUnwind ( const Function F)

Definition at line 69 of file EHPersonalities.cpp.

References classifyEHPersonality(), F, and isAsynchronousEHPersonality().

Referenced by markAliveBlocks(), and SimplifyFunction().

◆ canSinkOrHoistInst()

bool llvm::canSinkOrHoistInst ( Instruction I,
AAResults AA,
DominatorTree DT,
Loop CurLoop,
AliasSetTracker CurAST,
MemorySSAUpdater MSSAU,
bool  TargetExecutesOncePerLoop,
SinkAndHoistLICMFlags LICMFlags = nullptr,
OptimizationRemarkEmitter ORE = nullptr 
)

Returns true if is legal to hoist or sink this instruction disregarding the possible introduction of faults.

Reasoning about potential faulting instructions is the responsibility of the caller since it is challenging to do efficiently from within this routine. TargetExecutesOncePerLoop is true only when it is guaranteed that the target executes at most once per execution of the loop body. This is used to assess the legality of duplicating atomic loads. Generally, this is true when moving out of loop and not true when moving into loops. If ORE is set use it to emit optimization remarks.

Definition at line 1072 of file LICM.cpp.

References assert(), llvm::AliasSetTracker::begin(), llvm::LoopBase< BlockT, LoopT >::contains(), DEBUG_TYPE, llvm::MemorySSA::dominates(), llvm::OptimizationRemarkEmitter::emit(), llvm::AliasSetTracker::end(), FMRB_DoesNotAccessMemory, llvm::DITypeRefArray::get(), llvm::AliasSetTracker::getAliasSetFor(), llvm::MemorySSA::getBlockAccesses(), llvm::LoopBase< BlockT, LoopT >::getBlocks(), llvm::MemorySSAWalker::getClobberingMemoryAccess(), llvm::MemoryUseOrDef::getDefiningAccess(), llvm::MemorySSA::getMemoryAccess(), llvm::MemorySSAUpdater::getMemorySSA(), llvm::AAResults::getModRefBehavior(), llvm::MemorySSA::getSkipSelfWalker(), llvm::AliasSet::getUniqueInstruction(), I, llvm::MemorySSA::isLiveOnEntryDef(), isLoadInvariantInLoop(), llvm::Loop::isLoopInvariant(), llvm::SinkAndHoistLICMFlags::IsSink, llvm::SinkAndHoistLICMFlags::LicmMssaOptCap, llvm::SinkAndHoistLICMFlags::LicmMssaOptCounter, llvm::LLVMContext::MD_invariant_load, llvm::SinkAndHoistLICMFlags::NoOfMemAccTooLarge, llvm::AAResults::onlyAccessesArgPointees(), llvm::Argument::onlyReadsMemory(), pointerInvalidatedByLoop(), pointerInvalidatedByLoopWithMSSA(), llvm::AAResults::pointsToConstantMemory(), and llvm::LocationSize::unknown().

Referenced by hoistRegion(), sinkLoopInvariantInstructions(), and sinkRegion().

◆ cantFail() [1/3]

void llvm::cantFail ( Error  Err,
const char Msg = nullptr 
)
inline

Report a fatal error if Err is a failure value.

This function can be used to wrap calls to fallible functions ONLY when it is known that the Error will always be a success value. E.g.

// foo only attempts the fallible operation if DoFallibleOperation is
// true. If DoFallibleOperation is false then foo always returns
// Error::success().
Error foo(bool DoFallibleOperation);
cantFail(foo(false));
Lightweight error class with error context and mandatory checking.
Definition: Error.h:157
void cantFail(Error Err, const char *Msg=nullptr)
Report a fatal error if Err is a failure value.
Definition: Error.h:703

Definition at line 703 of file Error.h.

References llvm_unreachable.

Referenced by addPadding(), llvm::codeview::ContinuationRecordBuilder::begin(), commitFpm(), computeAddrMap(), llvm::msf::WritableMappedBlockStream::createFpmStream(), createRecord(), llvm::codeview::ContinuationRecordBuilder::end(), llvm::pdb::SymbolCache::getOrCreateGlobalSymbolByOffset(), llvm::codeview::getSymbolName(), handleAllErrors(), llvm::pdb::PDBFile::hasPDBIpiStream(), llvm::pdb::NativeEnumGlobals::NativeEnumGlobals(), resolveTypeIndexReferences(), llvm::codeview::SimpleTypeSerializer::serialize(), and llvm::codeview::ContinuationRecordBuilder::writeMemberType().

◆ cantFail() [2/3]

template<typename T >
T & llvm::cantFail ( Expected< T & >  ValOrErr,
const char Msg = nullptr 
)

Report a fatal error if ValOrErr is a failure value, otherwise unwraps and returns the contained reference.

This function can be used to wrap calls to fallible functions ONLY when it is known that the Error will always be a success value. E.g.

// foo only attempts the fallible operation if DoFallibleOperation is
// true. If DoFallibleOperation is false then foo always returns a Bar&.
Expected<Bar&> foo(bool DoFallibleOperation);
Bar &X = cantFail(foo(false));
static RegisterPass< Hello > X("hello", "Hello World Pass")
Tagged union holding either a T or a Error.
Definition: Error.h:433

Definition at line 749 of file Error.h.

References llvm_unreachable.

◆ cantFail() [3/3]

template<typename T >
T llvm::cantFail ( Expected< T >  ValOrErr,
const char Msg = nullptr 
)

Report a fatal error if ValOrErr is a failure value, otherwise unwraps and returns the contained value.

This function can be used to wrap calls to fallible functions ONLY when it is known that the Error will always be a success value. E.g.

// foo only attempts the fallible operation if DoFallibleOperation is
// true. If DoFallibleOperation is false then foo always returns an int.
Expected<int> foo(bool DoFallibleOperation);
int X = cantFail(foo(false));

Definition at line 725 of file Error.h.

References llvm_unreachable.

◆ canTrackArgumentsInterprocedurally()

bool llvm::canTrackArgumentsInterprocedurally ( Function F)

Determine if the values of the given function's arguments can be tracked interprocedurally.

The value of an argument can be tracked if the function has local linkage and its address is not taken.

Definition at line 19 of file ValueLatticeUtils.cpp.

References F.

Referenced by runCVP(), and runIPSCCP().

◆ canTrackGlobalVariableInterprocedurally()

bool llvm::canTrackGlobalVariableInterprocedurally ( GlobalVariable GV)

Determine if the value maintained in the given global variable can be tracked interprocedurally.

A value can be tracked if the global variable has local linkage and is only used by non-volatile loads and stores.

Definition at line 27 of file ValueLatticeUtils.cpp.

References llvm::GlobalVariable::hasDefinitiveInitializer(), llvm::GlobalValue::hasLocalLinkage(), if(), llvm::GlobalVariable::isConstant(), and llvm::Value::users().

Referenced by runIPSCCP().

◆ canTrackReturnsInterprocedurally()

bool llvm::canTrackReturnsInterprocedurally ( Function F)

Determine if the values of the given function's returns can be tracked interprocedurally.

Return values can be tracked if the function has an exact definition and it doesn't have the "naked" attribute. Naked functions may contain assembly code that returns untrackable values.

Definition at line 23 of file ValueLatticeUtils.cpp.

References F, and llvm::codeview::Naked.

Referenced by runIPSCCP().

◆ capacity_in_bytes()

template<typename T >
static size_t llvm::capacity_in_bytes ( const T &  x)
inlinestatic

Definition at line 22 of file Capacity.h.

◆ caseFoldingDjbHash()

uint32_t llvm::caseFoldingDjbHash ( StringRef  Buffer,
uint32_t  H = 5381 
)

Computes the Bernstein hash after folding the input according to the Dwarf 5 standard case folding rules.

Definition at line 71 of file DJB.cpp.

References chopOneUTF32(), djbHash(), fastCaseFoldingDjbHash(), foldCharDwarf(), H, and toUTF8().

◆ cast() [1/4]

template<class X , class Y >
std::enable_if<!is_simple_type< Y >::value, typenamecast_retty< X, constY >::ret_type >::type llvm::cast ( const Y Val)
inline

Definition at line 249 of file Casting.h.

References assert(), X(), and Y().

◆ cast() [2/4]

template<class X , class Y >
cast_retty< X, std::unique_ptr< Y > >::ret_type llvm::cast ( std::unique_ptr< Y > &&  Val)
inline

Definition at line 271 of file Casting.h.

References assert(), X(), and Y().

◆ cast() [3/4]

template<class X , class Y >
cast_retty< X, Y >::ret_type llvm::cast ( Y Val)
inline

Definition at line 256 of file Casting.h.

References assert(), X(), and Y().

◆ cast() [4/4]

template<class X , class Y >
cast_retty< X, Y * >::ret_type llvm::cast ( Y Val)
inline

Definition at line 263 of file Casting.h.

References assert(), X(), and Y().

◆ cast_or_null() [1/4]

template<class X , class Y >
LLVM_NODISCARD std::enable_if<!is_simple_type< Y >::value, typenamecast_retty< X, constY >::ret_type >::type llvm::cast_or_null ( const Y Val)
inline

Definition at line 286 of file Casting.h.

References assert().

◆ cast_or_null() [2/4]

template<class X , class Y >
cast_retty< X, std::unique_ptr< Y > >::ret_type llvm::cast_or_null ( std::unique_ptr< Y > &&  Val)
inline

Definition at line 314 of file Casting.h.

◆ cast_or_null() [3/4]

template<class X , class Y >
LLVM_NODISCARD std::enable_if<!is_simple_type< Y >::value, typenamecast_retty< X, Y >::ret_type >::type llvm::cast_or_null ( Y Val)
inline

Definition at line 297 of file Casting.h.

References assert().

◆ cast_or_null() [4/4]

template<class X , class Y >
LLVM_NODISCARD cast_retty< X, Y * >::ret_type llvm::cast_or_null ( Y Val)
inline

Definition at line 306 of file Casting.h.

References assert().

◆ castToCStr()

Value * llvm::castToCStr ( Value V,
IRBuilder<> &  B 
)

◆ center_justify()

FormattedString llvm::center_justify ( StringRef  Str,
unsigned  Width 
)
inline

center_justify - add spaces before and after string so total output is Width characters.

If Str is larger that Width, full string is written with no padding.

Definition at line 158 of file Format.h.

References llvm::FormattedString::JustifyCenter.

◆ changeToInvokeAndSplitBasicBlock()

BasicBlock * llvm::changeToInvokeAndSplitBasicBlock ( CallInst CI,
BasicBlock UnwindEdge 
)

◆ changeToUnreachable()

unsigned llvm::changeToUnreachable ( Instruction I,
bool  UseLLVMTrap,
bool  PreserveLCSSA = false,
DomTreeUpdater DTU = nullptr,
MemorySSAUpdater MSSAU = nullptr 
)

◆ CheckBitcodeOutputToConsole()

bool llvm::CheckBitcodeOutputToConsole ( raw_ostream stream_to_check,
bool  print_warning = true 
)

Determine if the raw_ostream provided is connected to a terminal.

If so, generate a warning message to errs() advising against display of bitcode and return true. Otherwise just return false. Check for output written to a console

Parameters
stream_to_checkThe stream to be checked
print_warningControl whether warnings are printed

Definition at line 18 of file SystemUtils.cpp.

References errs(), and llvm::raw_ostream::is_displayed().

◆ checkedAdd()

template<typename T >
std::enable_if< std::is_signed< T >::value, llvm::Optional< T > >::type llvm::checkedAdd ( LHS,
RHS 
)

Add two signed integers LHS and RHS.

Returns
Optional of sum if no signed overflow occurred, None otherwise.

Definition at line 48 of file CheckedArithmetic.h.

Referenced by checkedMulAdd(), and llvm::InterleaveGroup< InstTy >::insertMember().

◆ checkedAddUnsigned()

template<typename T >
std::enable_if< std::is_unsigned< T >::value, llvm::Optional< T > >::type llvm::checkedAddUnsigned ( LHS,
RHS 
)

Add two unsigned integers LHS and RHS.

Returns
Optional of sum if no unsigned overflow occurred, None otherwise.

Definition at line 86 of file CheckedArithmetic.h.

Referenced by checkedMulAddUnsigned().

◆ checkedMul()

template<typename T >
std::enable_if< std::is_signed< T >::value, llvm::Optional< T > >::type llvm::checkedMul ( LHS,
RHS 
)

Multiply two signed integers LHS and RHS.

Returns
Optional of product if no signed overflow occurred, None otherwise.

Definition at line 66 of file CheckedArithmetic.h.

Referenced by checkedMulAdd().

◆ checkedMulAdd()

template<typename T >
std::enable_if< std::is_signed< T >::value, llvm::Optional< T > >::type llvm::checkedMulAdd ( A,
B,
C 
)

Multiply A and B, and add C to the resulting product.

Returns
Optional of result if no signed overflow occurred, None otherwise.

Definition at line 75 of file CheckedArithmetic.h.

References checkedAdd(), checkedMul(), and None.

◆ checkedMulAddUnsigned()

template<typename T >
std::enable_if< std::is_unsigned< T >::value, llvm::Optional< T > >::type llvm::checkedMulAddUnsigned ( A,
B,
C 
)

Multiply unsigned integers A and B, and add C to the resulting product.

Returns
Optional of result if no unsigned overflow occurred, None otherwise.

Definition at line 104 of file CheckedArithmetic.h.

References checkedAddUnsigned(), checkedMulUnsigned(), and None.

◆ checkedMulUnsigned()

template<typename T >
std::enable_if< std::is_unsigned< T >::value, llvm::Optional< T > >::type llvm::checkedMulUnsigned ( LHS,
RHS 
)

Multiply two unsigned integers LHS and RHS.

Returns
Optional of product if no unsigned overflow occurred, None otherwise.

Definition at line 95 of file CheckedArithmetic.h.

Referenced by checkedMulAddUnsigned().

◆ checkedSub()

template<typename T >
std::enable_if< std::is_signed< T >::value, llvm::Optional< T > >::type llvm::checkedSub ( LHS,
RHS 
)

Subtract two signed integers LHS and RHS.

Returns
Optional of sum if no signed overflow occurred, None otherwise.

Definition at line 57 of file CheckedArithmetic.h.

Referenced by llvm::InterleaveGroup< InstTy >::insertMember().

◆ checkGEPType()

Type * llvm::checkGEPType ( Type Ty)
inline

Definition at line 867 of file Instructions.h.

References assert().

Referenced by llvm::GetElementPtrInst::getGEPReturnType().

◆ classifyEHPersonality()

EHPersonality llvm::classifyEHPersonality ( const Value Pers)

See if the given exception handling personality function is one that we understand.

If so, return a description of it; otherwise return Unknown.

Definition at line 21 of file EHPersonalities.cpp.

References F, and llvm::Value::stripPointerCasts().

Referenced by canSimplifyInvokeNoUnwind(), llvm::LoopSafetyInfo::computeBlockColors(), InlineFunction(), isUsingScopeBasedEH(), llvm::EscapeEnumerator::Next(), and llvm::InstCombiner::visitLandingPadInst().

◆ clearMod()

LLVM_NODISCARD ModRefInfo llvm::clearMod ( const ModRefInfo  MRI)
inline

Definition at line 176 of file AliasAnalysis.h.

References Ref.

Referenced by llvm::AliasSetTracker::add().

◆ clearMust()

LLVM_NODISCARD ModRefInfo llvm::clearMust ( const ModRefInfo  MRI)
inline

◆ clearRef()

LLVM_NODISCARD ModRefInfo llvm::clearRef ( const ModRefInfo  MRI)
inline

Definition at line 179 of file AliasAnalysis.h.

References Mod.

◆ CloneAndPruneFunctionInto()

void llvm::CloneAndPruneFunctionInto ( Function NewFunc,
const Function OldFunc,
ValueToValueMapTy VMap,
bool  ModuleLevelChanges,
SmallVectorImpl< ReturnInst * > &  Returns,
const char NameSuffix = "",
ClonedCodeInfo CodeInfo = nullptr,
Instruction TheCall = nullptr 
)

This works exactly like CloneFunctionInto, except that it does some simple constant prop and DCE on the fly.

The effect of this is to copy significantly less code in cases where (for example) a function call with constant arguments is inlined, and those constant arguments cause a significant amount of code in the callee to be dead. Since this doesn't produce an exactly copy of the input, it can't be used for things like CloneFunction or CloneModule.

If ModuleLevelChanges is false, VMap contains no non-identity GlobalValue mappings.

The effect of this is to copy significantly less code in cases where (for example) a function call with constant arguments is inlined, and those constant arguments cause a significant amount of code in the callee to be dead. Since this doesn't produce an exact copy of the input, it can't be used for things like CloneFunction or CloneModule.

Definition at line 711 of file CloneFunction.cpp.

References CloneAndPruneIntoFromInst(), llvm::BasicBlock::front(), and llvm::Function::front().

Referenced by InlineFunction().

◆ CloneAndPruneIntoFromInst()

void llvm::CloneAndPruneIntoFromInst ( Function NewFunc,
const Function OldFunc,
const Instruction StartingInst,
ValueToValueMapTy VMap,
bool  ModuleLevelChanges,
SmallVectorImpl< ReturnInst * > &  Returns,
const char NameSuffix = "",
ClonedCodeInfo CodeInfo = nullptr 
)

This works like CloneAndPruneFunctionInto, except that it does not clone the entire function.

Instead it starts at an instruction provided by the caller and copies (and prunes) only the code reachable from that instruction.

Definition at line 433 of file CloneFunction.cpp.

References llvm::Function::args(), assert(), llvm::BasicBlock::back(), llvm::BasicBlock::begin(), ConstantFoldTerminator(), llvm::ValueMap< KeyT, ValueT, Config >::count(), DeleteDeadBlock(), llvm::Function::end(), llvm::BasicBlock::eraseFromParent(), llvm::Instruction::eraseFromParent(), llvm::BasicBlock::front(), llvm::UndefValue::get(), llvm::Function::getBasicBlockList(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, IterTy >::getCalledFunction(), llvm::Module::getDataLayout(), llvm::Function::getEntryBlock(), llvm::PHINode::getIncomingBlock(), llvm::PHINode::getIncomingValue(), llvm::BasicBlock::getInstList(), llvm::PHINode::getNumIncomingValues(), llvm::GlobalValue::getParent(), llvm::Instruction::getParent(), getParent(), llvm::BasicBlock::getSinglePredecessor(), llvm::BranchInst::getSuccessor(), llvm::BasicBlock::getTerminator(), llvm::Value::getType(), I, Idx, llvm::BranchInst::isConditional(), isInstructionTriviallyDead(), llvm::Function::isIntrinsic(), llvm::ValueMap< KeyT, ValueT, Config >::lookup(), MapValue(), pred_begin(), pred_end(), pred_size(), RemapInstruction(), llvm::PHINode::removeIncomingValue(), llvm::Value::replaceAllUsesWith(), RF_NoModuleLevelChanges, RF_None, llvm::PHINode::setIncomingBlock(), llvm::PHINode::setIncomingValue(), SimplifyInstruction(), and llvm::Value::users().

Referenced by CloneAndPruneFunctionInto().

◆ CloneBasicBlock()

BasicBlock * llvm::CloneBasicBlock ( const BasicBlock BB,
ValueToValueMapTy VMap,
const Twine &  NameSuffix = "",
Function F = nullptr,
ClonedCodeInfo CodeInfo = nullptr,
DebugInfoFinder DIFinder = nullptr 
)

Return a copy of the specified basic block, but without embedding the block into a particular function.

See comments in Cloning.h.

The block returned is an exact copy of the specified basic block, without any remapping having been performed. Because of this, this is only suitable for applications where the basic block will be inserted into the same function that it was cloned from (loop unrolling would use this, for example).

Also, note that this function makes a direct copy of the basic block, and can thus produce illegal LLVM code. In particular, it will copy any PHI nodes from the original block, even though there are no predecessors for the newly cloned block (thus, phi nodes will have to be updated). Also, this block will branch to the old successors of the original block: these successors will have to have any PHI nodes updated to account for the new incoming edges.

The correlation between instructions in the source and result basic blocks is recorded in the VMap map.

If you have a particular suffix you'd like to use to add to any cloned names, specify it as the optional third parameter.

If you would like the basic block to be auto-inserted into the end of a function, you can specify it as the optional fourth parameter.

If you would like to collect additional information about the cloned function, you can specify a ClonedCodeInfo object with the optional fifth parameter.

Definition at line 40 of file CloneFunction.cpp.

References llvm::ClonedCodeInfo::ContainsCalls, llvm::ClonedCodeInfo::ContainsDynamicAllocas, llvm::BasicBlock::Create(), F, llvm::BasicBlock::getContext(), llvm::Function::getEntryBlock(), llvm::BasicBlock::getInstList(), llvm::Value::getName(), llvm::BasicBlock::getParent(), llvm::Value::hasName(), I, llvm::DebugInfoFinder::processInstruction(), and llvm::Value::setName().

Referenced by buildClonedLoopBlocks(), CloneFunctionInto(), cloneLoopBlocks(), CloneLoopBlocks(), cloneLoopWithPreheader(), SplitIndirectBrCriticalEdges(), UnrollAndJamLoop(), and UnrollLoop().

◆ CloneFunction()

Function * llvm::CloneFunction ( Function F,
ValueToValueMapTy VMap,
ClonedCodeInfo CodeInfo = nullptr 
)

Return a copy of the specified function and add it to that function's module.

Also, any references specified in the VMap are changed to refer to their mapped value instead of the original one. If any of the arguments to the function are in the VMap, the arguments are deleted from the resultant function. The VMap is updated to include mappings from all of the instructions and basicblocks in the function from their old to new values. The final argument captures information about the cloned code if non-null.

VMap contains no non-identity GlobalValue mappings and debug info metadata will not be cloned.

Also, any references specified in the VMap are changed to refer to their mapped value instead of the original one. If any of the arguments to the function are in the VMap, the arguments are deleted from the resultant function. The VMap is updated to include mappings from all of the instructions and basicblocks in the function from their old to new values.

Definition at line 222 of file CloneFunction.cpp.

References llvm::Function::arg_begin(), CloneFunctionInto(), llvm::ValueMap< KeyT, ValueT, Config >::count(), llvm::Function::Create(), F, llvm::FunctionType::get(), I, and llvm::Value::setName().

Referenced by replaceAliasWithAliasee().

◆ CloneFunctionInto()

void llvm::CloneFunctionInto ( Function NewFunc,
const Function OldFunc,
ValueToValueMapTy VMap,
bool  ModuleLevelChanges,
SmallVectorImpl< ReturnInst * > &  Returns,
const char NameSuffix = "",
ClonedCodeInfo CodeInfo = nullptr,
ValueMapTypeRemapper TypeMapper = nullptr,
ValueMaterializer Materializer = nullptr 
)

Clone OldFunc into NewFunc, transforming the old arguments into references to VMap values.

Note that if NewFunc already has basic blocks, the ones cloned into it will be added to the end of the function. This function fills in a list of return instructions, and can optionally remap types and/or append the specified suffix to all values cloned.

If ModuleLevelChanges is false, VMap contains no non-identity GlobalValue mappings.

Definition at line 84 of file CloneFunction.cpp.

References llvm::GlobalObject::addMetadata(), llvm::Function::arg_size(), llvm::Function::args(), assert(), llvm::Function::begin(), CloneBasicBlock(), llvm::DebugInfoFinder::compile_units(), llvm::Function::copyAttributesFrom(), llvm::ValueMap< KeyT, ValueT, Config >::count(), llvm::Function::end(), llvm::Function::front(), llvm::BlockAddress::get(), llvm::AttributeList::get(), llvm::GlobalObject::getAllMetadata(), llvm::Function::getAttributes(), llvm::Function::getContext(), llvm::DIScope::getFile(), llvm::AttributeList::getFnAttributes(), llvm::AttributeList::getParamAttributes(), llvm::GlobalValue::getParent(), llvm::Function::getPersonalityFn(), llvm::AttributeList::getRetAttributes(), llvm::Function::getSubprogram(), llvm::BasicBlock::getTerminator(), llvm::BasicBlock::hasAddressTaken(), llvm::Function::hasPersonalityFn(), I, MapMetadata(), MapValue(), llvm::ValueMap< KeyT, ValueT, Config >::MD(), RemapInstruction(), RF_NoModuleLevelChanges, RF_None, llvm::Function::setAttributes(), llvm::Function::setPersonalityFn(), llvm::DebugInfoFinder::subprograms(), and llvm::DebugInfoFinder::types().

Referenced by CloneFunction(), CloneModule(), and createClone().

◆ cloneLoopWithPreheader()

Loop * llvm::cloneLoopWithPreheader ( BasicBlock Before,
BasicBlock LoopDomBB,
Loop OrigLoop,
ValueToValueMapTy VMap,
const Twine &  NameSuffix,
LoopInfo LI,
DominatorTree DT,
SmallVectorImpl< BasicBlock * > &  Blocks 
)

◆ CloneModule() [1/3]

std::unique_ptr< Module > llvm::CloneModule ( const Module M)

Return an exact copy of the specified module.

This is not as easy as it might seem because we have to worry about making copies of global variables and functions, and making their (initializers and references, respectively) refer to the right globals.

Definition at line 34 of file CloneModule.cpp.

References CloneModule().

Referenced by CloneModule(), LLVMCloneModule(), and SplitModule().

◆ CloneModule() [2/3]

std::unique_ptr< Module > llvm::CloneModule ( const Module M,
ValueToValueMapTy VMap 
)

Definition at line 41 of file CloneModule.cpp.

References CloneModule().

◆ CloneModule() [3/3]

std::unique_ptr< Module > llvm::CloneModule ( const Module M,
ValueToValueMapTy VMap,
function_ref< bool(const GlobalValue *)>  ShouldCloneDefinition 
)

◆ collectChildrenInLoop()

SmallVector< DomTreeNode *, 16 > llvm::collectChildrenInLoop ( DomTreeNode N,
const Loop CurLoop 
)

Does a BFS from a given node to all of its children inside a given loop.

The returned vector of nodes includes the starting point.

Definition at line 432 of file LoopUtils.cpp.

References llvm::LoopBase< BlockT, LoopT >::contains(), I, and N.

Referenced by sinkRegion().

◆ collectCmpOps()

void llvm::collectCmpOps ( CmpInst Comparison,
SmallVectorImpl< Value * > &  CmpOperands 
)

Definition at line 292 of file PredicateInfo.cpp.

References llvm::User::getOperand().

◆ collectUsedGlobalVariables()

GlobalVariable * llvm::collectUsedGlobalVariables ( const Module M,
SmallPtrSetImpl< GlobalValue * > &  Set,
bool  CompilerUsed 
)

Given "llvm.used" or "llvm.compiler.used" as a global name, collect the initializer elements of that global in Set and return the global itself.

Definition at line 598 of file Module.cpp.

References G, llvm::GlobalVariable::getInitializer(), llvm::GlobalVariable::hasInitializer(), and llvm::User::operands().

Referenced by buildModuleSummaryIndex(), llvm::FunctionImportGlobalProcessing::FunctionImportGlobalProcessing(), and llvm::InternalizePass::internalizeModule().

◆ colorEHFunclets()

DenseMap< BasicBlock *, ColorVector > llvm::colorEHFunclets ( Function F)

If an EH funclet personality is in use (see isFuncletEHPersonality), this will recompute which blocks are in which funclet.

It is possible that some blocks are in multiple funclets. Consider this analysis to be expensive.

Definition at line 77 of file EHPersonalities.cpp.

References dbgs(), DEBUG_WITH_TYPE, F, llvm::BasicBlock::getFirstNonPHI(), llvm::Value::getName(), llvm::BasicBlock::getParent(), llvm::BasicBlock::getTerminator(), llvm::Instruction::isEHPad(), and successors().

Referenced by llvm::LoopSafetyInfo::computeBlockColors().

◆ combineKnownMetadata()

static void llvm::combineKnownMetadata ( Instruction ReplInst,
Instruction I 
)
static

◆ combineLostFractions()

static lostFraction llvm::combineLostFractions ( lostFraction  moreSignificant,
lostFraction  lessSignificant 
)
static

Definition at line 492 of file APFloat.cpp.

◆ combineMetadata()

void llvm::combineMetadata ( Instruction K,
const Instruction J,
ArrayRef< unsigned KnownIDs,
bool  DoesKMove 
)

◆ combineMetadataForCSE()

void llvm::combineMetadataForCSE ( Instruction K,
const Instruction J,
bool  DoesKMove 
)

Combine the metadata of two instructions so that K can replace J.

This specifically handles the case of CSE-like transformations. Some metadata can only be kept if K dominates J. For this to be correct, K cannot be hoisted.

Unknown metadata is removed.

Definition at line 2379 of file Local.cpp.

References combineMetadata(), llvm::LLVMContext::MD_access_group, llvm::LLVMContext::MD_alias_scope, llvm::LLVMContext::MD_align, llvm::LLVMContext::MD_dereferenceable, llvm::LLVMContext::MD_dereferenceable_or_null, llvm::LLVMContext::MD_invariant_group, llvm::LLVMContext::MD_invariant_load, llvm::LLVMContext::MD_noalias, llvm::LLVMContext::MD_nonnull, llvm::LLVMContext::MD_range, and llvm::LLVMContext::MD_tbaa.

Referenced by llvm::JumpThreadingPass::SimplifyPartiallyRedundantLoad(), sinkLastInstruction(), and llvm::InstCombiner::visitLoadInst().

◆ compareLoops()

template<class BlockT , class LoopT >
static void llvm::compareLoops ( const LoopT *  L,
const LoopT *  OtherL,
DenseMap< BlockT *, const LoopT * > &  OtherLoopHeaders 
)
static

◆ CompareVars()

static bool llvm::CompareVars ( const ASanStackVariableDescription a,
const ASanStackVariableDescription b 
)
inlinestatic

◆ compareVectors()

template<typename T >
bool llvm::compareVectors ( std::vector< T > &  BB1,
std::vector< T > &  BB2 
)

Definition at line 624 of file LoopInfoImpl.h.

Referenced by compareLoops().

◆ ComputeASanStackFrameDescription()

SmallString< 64 > llvm::ComputeASanStackFrameDescription ( const SmallVectorImpl< ASanStackVariableDescription > &  Vars)

Definition at line 97 of file ASanStackFrameLayout.cpp.

References llvm::raw_svector_ostream::str(), and to_string().

◆ ComputeASanStackFrameLayout()

ASanStackFrameLayout llvm::ComputeASanStackFrameLayout ( SmallVectorImpl< ASanStackVariableDescription > &  Vars,
size_t  Granularity,
size_t  MinHeaderSize 
)

◆ computeConstantRange()

ConstantRange llvm::computeConstantRange ( const Value V,
bool  UseInstrInfo = true 
)

◆ ComputeCrossModuleImport()

void llvm::ComputeCrossModuleImport ( const ModuleSummaryIndex Index,
const StringMap< GVSummaryMapTy > &  ModuleToDefinedGVSummaries,
StringMap< FunctionImporter::ImportMapTy > &  ImportLists,
StringMap< FunctionImporter::ExportSetTy > &  ExportLists 
)

Compute all the imports and exports for every module in the Index.

Compute all the import and export for every module using the Index.

ModuleToDefinedGVSummaries contains for each Module a map (GUID -> Summary) for every global defined in the module.

ImportLists will be populated with an entry for every Module we are importing into. This entry is itself a map that can be passed to FunctionImporter::importFunctions() above (see description there).

ExportLists contains for each Module the set of globals (GUID) that will be imported by another module, or referenced by such a function. I.e. this is the set of globals that need to be promoted/renamed appropriately.

Definition at line 618 of file FunctionImport.cpp.

References ComputeImportForModule(), dbgs(), LLVM_DEBUG, and numGlobalVarSummaries().

Referenced by llvm::ThinLTOCodeGenerator::crossModuleImport(), llvm::ThinLTOCodeGenerator::emitImports(), llvm::ThinLTOCodeGenerator::gatherImportedSummariesForModule(), llvm::ThinLTOCodeGenerator::internalize(), llvm::ThinLTOCodeGenerator::promote(), and llvm::ThinLTOCodeGenerator::run().

◆ ComputeCrossModuleImportForModule()

void llvm::ComputeCrossModuleImportForModule ( StringRef  ModulePath,
const ModuleSummaryIndex Index,
FunctionImporter::ImportMapTy ImportList 
)

Compute all the imports for the given module using the Index.

Compute all the imports for the given module in the Index.

ImportList will be populated with a map that can be passed to FunctionImporter::importFunctions() above (see description there).

Definition at line 690 of file FunctionImport.cpp.

References llvm::ModuleSummaryIndex::collectDefinedFunctionsForModule(), ComputeImportForModule(), dbgs(), dumpImportListForModule(), and LLVM_DEBUG.

Referenced by doImportingForModule().

◆ ComputeCrossModuleImportForModuleFromIndex()

void llvm::ComputeCrossModuleImportForModuleFromIndex ( StringRef  ModulePath,
const ModuleSummaryIndex Index,
FunctionImporter::ImportMapTy ImportList 
)

Mark all external summaries in Index for import into the given module.

Used for distributed builds using a distributed index.

ImportList will be populated with a map that can be passed to FunctionImporter::importFunctions() above (see description there).

Definition at line 709 of file FunctionImport.cpp.

References assert(), and dumpImportListForModule().

Referenced by doImportingForModule().

◆ computeDeadSymbols()

void llvm::computeDeadSymbols ( ModuleSummaryIndex Index,
const DenseSet< GlobalValue::GUID > &  GUIDPreservedSymbols,
function_ref< PrevailingType(GlobalValue::GUID)>  isPrevailing 
)

Compute all the symbols that are "dead": i.e these that can't be reached in the graph from any of the given symbols listed in GUIDPreservedSymbols.

Non-prevailing symbols are symbols without a prevailing copy anywhere in IR and are normally dead, isPrevailing predicate returns status of symbol.

Definition at line 733 of file FunctionImport.cpp.

References assert(), llvm::GlobalValue::AvailableExternallyLinkage, ComputeDead, dbgs(), llvm::ValueInfo::getSummaryList(), llvm::ModuleSummaryIndex::getValueInfo(), llvm::GlobalValue::isInterposableLinkage(), llvm::GlobalValue::LinkOnceODRLinkage, LLVM_DEBUG, Ref, report_fatal_error(), updateValueInfoForIndirectCalls(), llvm::GlobalValue::WeakODRLinkage, and llvm::ModuleSummaryIndex::withGlobalValueDeadStripping().

Referenced by computeDeadSymbolsWithConstProp().

◆ computeDeadSymbolsWithConstProp()

void llvm::computeDeadSymbolsWithConstProp ( ModuleSummaryIndex Index,
const DenseSet< GlobalValue::GUID > &  GUIDPreservedSymbols,
function_ref< PrevailingType(GlobalValue::GUID)>  isPrevailing,
bool  ImportEnabled 
)

Compute dead symbols and run constant propagation in combined index after that.

Definition at line 846 of file FunctionImport.cpp.

References computeDeadSymbols(), P, and llvm::ModuleSummaryIndex::propagateAttributes().

Referenced by computeDeadSymbolsInIndex(), and llvm::lto::LTO::run().

◆ computeExpressionSize()

static unsigned short llvm::computeExpressionSize ( ArrayRef< const SCEV * >  Args)
static

Definition at line 67 of file ScalarEvolutionExpressions.h.

◆ computeFunctionBodyMemoryAccess()

MemoryAccessKind llvm::computeFunctionBodyMemoryAccess ( Function F,
AAResults AAR 
)

Returns the memory access properties of this copy of the function.

Definition at line 229 of file FunctionAttrs.cpp.

References checkFunctionMemoryAccess(), and F.

◆ computeKnownBits() [1/2]

KnownBits llvm::computeKnownBits ( const Value V,
const DataLayout DL,
unsigned  Depth = 0,
AssumptionCache AC = nullptr,
const Instruction CxtI = nullptr,
const DominatorTree DT = nullptr,
OptimizationRemarkEmitter ORE = nullptr,
bool  UseInstrInfo = true 
)

Returns the known bits rather than passing by reference.

Definition at line 179 of file ValueTracking.cpp.

References safeCxtI().

◆ computeKnownBits() [2/2]

void llvm::computeKnownBits ( const Value V,
KnownBits Known,
const DataLayout DL,
unsigned  Depth = 0,
AssumptionCache AC = nullptr,
const Instruction CxtI = nullptr,
const DominatorTree DT = nullptr,
OptimizationRemarkEmitter ORE = nullptr,
bool  UseInstrInfo = true 
)

Determine which bits of V are known to be either zero or one and return them in the KnownZero/KnownOne bit sets.

This function is defined on values with integer type, values with pointer type, and vectors of integers. In the case where V is a vector, the known zero and known one values are the same width as the vector element, and the bit is set only if it is true for all of the elements in the vector.

Definition at line 167 of file ValueTracking.cpp.

References computeKnownBits(), and safeCxtI().

Referenced by aliasSameBasePointerGEPs(), llvm::InstCombiner::computeKnownBits(), llvm::slpvectorizer::BoUpSLP::computeMinimumValueSizes(), computeRecurrenceType(), eliminateDeadSwitchCases(), getOrEnforceKnownAlignment(), isZero(), SimplifyAndInst(), simplifyICmpWithBinOp(), simplifyICmpWithZero(), SimplifyInstruction(), SimplifyLShrInst(), SimplifyRightShift(), SimplifyShift(), and SimplifySubInst().

◆ computeKnownBitsFromRangeMetadata()

void llvm::computeKnownBitsFromRangeMetadata ( const MDNode Ranges,
KnownBits Known 
)

Compute known bits from the range metadata.

KnownZero the set of bits that are known to be zero KnownOne the set of bits that are known to be one

Definition at line 438 of file ValueTracking.cpp.

References assert(), countLeadingZeros(), llvm::KnownBits::getBitWidth(), llvm::MDNode::getNumOperands(), llvm::MDNode::getOperand(), llvm::ConstantRange::getUnsignedMax(), llvm::ConstantRange::getUnsignedMin(), Lower, llvm::KnownBits::One, Upper, and llvm::KnownBits::Zero.

Referenced by computeKnownBitsFromOperator().

◆ computeLTOCacheKey()

void llvm::computeLTOCacheKey ( SmallString< 40 > &  Key,
const lto::Config Conf,
const ModuleSummaryIndex Index,
StringRef  ModuleID,
const FunctionImporter::ImportMapTy ImportList,
const FunctionImporter::ExportSetTy ExportList,
const std::map< GlobalValue::GUID, GlobalValue::LinkageTypes > &  ResolvedODR,
const GVSummaryMapTy DefinedGlobals,
const std::set< GlobalValue::GUID > &  CfiFunctionDefs = {},
const std::set< GlobalValue::GUID > &  CfiFunctionDecls = {} 
)

◆ computeMinimumValueSizes()

MapVector< Instruction *, uint64_t > llvm::computeMinimumValueSizes ( ArrayRef< BasicBlock * >  Blocks,
DemandedBits DB,
const TargetTransformInfo TTI = nullptr 
)

Compute a map of integer instructions to their minimum legal type size.

C semantics force sub-int-sized values (e.g. i8, i16) to be promoted to int type (e.g. i32) whenever arithmetic is performed on them.

For targets with native i8 or i16 operations, usually InstCombine can shrink the arithmetic type down again. However InstCombine refuses to create illegal types, so for targets without i8 or i16 registers, the lengthening and shrinking remains.

Most SIMD ISAs (e.g. NEON) however support vectors of i8 or i16 even when their scalar equivalents do not, so during vectorization it is important to remove these lengthens and truncates when deciding the profitability of vectorization.

This function analyzes the given range of instructions and determines the minimum type size each can be converted to. It attempts to remove or minimize type size changes across each def-use chain, so for example in the following code:

%1 = load i8, i8* %2 = add i8 %1, 2 %3 = load i16, i16* %4 = zext i8 %2 to i32 %5 = zext i16 %3 to i32 %6 = add i32 %4, %5 %7 = trunc i32 %6 to i16

Instruction %6 must be done at least in i16, so computeMinimumValueSizes will return: {%1: 16, %2: 16, %3: 16, %4: 16, %5: 16, %6: 16, %7: 16}.

If the optional TargetTransformInfo is provided, this function tries harder to do less work by only looking at illegal types.

Definition at line 366 of file VectorUtils.cpp.

◆ ComputeMultiple()

bool llvm::ComputeMultiple ( Value V,
unsigned  Base,
Value *&  Multiple,
bool  LookThroughSExt = false,
unsigned  Depth = 0 
)

This function computes the integer multiple of Base that equals V.

If successful, it returns true and returns the multiple in Multiple. If unsuccessful, it returns false. Also, if V can be simplified to an integer, then the simplified V is returned in Val. Look through sext only if LookThroughSExt=true.

If successful, it returns true and returns the multiple in Multiple. If unsuccessful, it returns false. It looks through SExt instructions only if LookThroughSExt is true.

Definition at line 2656 of file ValueTracking.cpp.

References assert(), ComputeMultiple(), llvm::ConstantInt::get(), llvm::Value::getContext(), llvm::ConstantExpr::getMul(), llvm::Value::getType(), llvm::ConstantInt::getValue(), llvm::ConstantExpr::getZExt(), llvm::ConstantInt::getZExtValue(), I, llvm::Type::isIntegerTy(), LLVM_FALLTHROUGH, and MaxDepth.

Referenced by computeArraySize(), and ComputeMultiple().

◆ ComputeNumSignBits()

unsigned llvm::ComputeNumSignBits ( const Value Op,
const DataLayout DL,
unsigned  Depth = 0,
AssumptionCache AC = nullptr,
const Instruction CxtI = nullptr,
const DominatorTree DT = nullptr,
bool  UseInstrInfo = true 
)

Return the number of times the sign bit of the register is replicated into the other bits.

We know that at least 1 bit is always equal to the sign bit (itself), but other cases can give us information. For example, immediately after an "ashr X, 2", we know that the top 3 bits are all equal to each other, so we return 3. For vectors, return the number of sign bits for the vector element with the mininum number of known sign bits.

Definition at line 299 of file ValueTracking.cpp.

References safeCxtI().

Referenced by llvm::slpvectorizer::BoUpSLP::computeMinimumValueSizes(), llvm::InstCombiner::ComputeNumSignBits(), computeRecurrenceType(), eliminateDeadSwitchCases(), and SimplifyAShrInst().

◆ computeOverflowForSignedAdd() [1/2]

OverflowResult llvm::computeOverflowForSignedAdd ( const AddOperator Add,
const DataLayout DL,
AssumptionCache AC = nullptr,
const Instruction CxtI = nullptr,
const DominatorTree DT = nullptr 
)

This version also leverages the sign bit of Add if known.

Definition at line 4205 of file ValueTracking.cpp.

References llvm::User::getOperand().

◆ computeOverflowForSignedAdd() [2/2]

OverflowResult llvm::computeOverflowForSignedAdd ( const Value LHS,
const Value RHS,
const DataLayout DL,
AssumptionCache AC = nullptr,
const Instruction CxtI = nullptr,
const DominatorTree DT = nullptr 
)

Definition at line 4214 of file ValueTracking.cpp.

Referenced by llvm::InstCombiner::computeOverflowForSignedAdd().

◆ computeOverflowForSignedMul()

OverflowResult llvm::computeOverflowForSignedMul ( const Value LHS,
const Value RHS,
const DataLayout DL,
AssumptionCache AC,
const Instruction CxtI,
const DominatorTree DT,
bool  UseInstrInfo = true 
)

◆ computeOverflowForSignedSub()

OverflowResult llvm::computeOverflowForSignedSub ( const Value LHS,
const Value RHS,
const DataLayout DL,
AssumptionCache AC,
const Instruction CxtI,
const DominatorTree DT 
)

◆ computeOverflowForUnsignedAdd()

OverflowResult llvm::computeOverflowForUnsignedAdd ( const Value LHS,
const Value RHS,
const DataLayout DL,
AssumptionCache AC,
const Instruction CxtI,
const DominatorTree DT,
bool  UseInstrInfo = true 
)

◆ computeOverflowForUnsignedMul()

OverflowResult llvm::computeOverflowForUnsignedMul ( const Value LHS,
const Value RHS,
const DataLayout DL,
AssumptionCache AC,
const Instruction CxtI,
const DominatorTree DT,
bool  UseInstrInfo = true 
)

◆ computeOverflowForUnsignedSub()

OverflowResult llvm::computeOverflowForUnsignedSub ( const Value LHS,
const Value RHS,
const DataLayout DL,
AssumptionCache AC,
const Instruction CxtI,
const DominatorTree DT 
)

◆ computePeelCount()

void llvm::computePeelCount ( Loop L,
unsigned  LoopSize,
TargetTransformInfo::UnrollingPreferences UP,
unsigned TripCount,
ScalarEvolution SE 
)

◆ ComputeSpeculationCost()

static unsigned llvm::ComputeSpeculationCost ( const Instruction I,
const TargetTransformInfo TTI 
)
static

◆ computeSyntheticCounts()

void llvm::computeSyntheticCounts ( ModuleSummaryIndex Index)

◆ computeUnrollCount()

bool llvm::computeUnrollCount ( Loop L,
const TargetTransformInfo TTI,
DominatorTree DT,
LoopInfo LI,
ScalarEvolution SE,
const SmallPtrSetImpl< const Value * > &  EphValues,
OptimizationRemarkEmitter ORE,
unsigned TripCount,
unsigned  MaxTripCount,
unsigned TripMultiple,
unsigned  LoopSize,
TargetTransformInfo::UnrollingPreferences UP,
bool UseUpperBound 
)

Definition at line 729 of file LoopUnrollPass.cpp.

References llvm::TargetTransformInfo::UnrollingPreferences::AllowExpensiveTripCount, llvm::TargetTransformInfo::UnrollingPreferences::AllowRemainder, analyzeLoopUnrollCost(), assert(), llvm::TargetTransformInfo::UnrollingPreferences::BEInsns, computePeelCount(), llvm::TargetTransformInfo::UnrollingPreferences::Count, dbgs(), DEBUG_TYPE, llvm::TargetTransformInfo::UnrollingPreferences::DefaultUnrollRuntimeCount, llvm::OptimizationRemarkEmitter::emit(), FlatLoopTripCountThreshold, llvm::TargetTransformInfo::UnrollingPreferences::Force, llvm::TargetTransformInfo::UnrollingPreferences::FullUnrollMaxCount, getFullUnrollBoostingFactor(), llvm::LoopBase< BlockT, LoopT >::getHeader(), getLoopEstimatedTripCount(), llvm::BasicBlock::getParent(), llvm::Loop::getStartLoc(), getUnrolledLoopSize(), llvm::Function::hasProfileData(), HasRuntimeUnrollDisablePragma(), HasUnrollEnablePragma(), HasUnrollFullPragma(), LLVM_DEBUG, llvm::TargetTransformInfo::UnrollingPreferences::MaxCount, llvm::TargetTransformInfo::UnrollingPreferences::MaxPercentThresholdBoost, NoThreshold, llvm::TargetTransformInfo::UnrollingPreferences::Partial, llvm::TargetTransformInfo::UnrollingPreferences::PartialThreshold, llvm::TargetTransformInfo::UnrollingPreferences::PeelCount, PragmaUnrollThreshold, llvm::TargetTransformInfo::UnrollingPreferences::Runtime, llvm::TargetTransformInfo::UnrollingPreferences::Threshold, UnrollCount, UnrollCountPragmaValue(), and llvm::TargetTransformInfo::UnrollingPreferences::UpperBound.

Referenced by computeUnrollAndJamCount(), and tryToUnrollLoop().

◆ concatenateVectors()

Value * llvm::concatenateVectors ( IRBuilder<> &  Builder,
ArrayRef< Value * >  Vecs 
)

Concatenate a list of vectors.

This function generates code that concatenate the vectors in Vecs into a single large vector. The number of vectors should be greater than one, and their element types should be the same. The number of elements in the vectors should also be the same; however, if the last vector has fewer elements, it will be padded with undefs.

Definition at line 723 of file VectorUtils.cpp.

References assert(), concatenateTwoVectors(), and llvm::Value::getType().

Referenced by llvm::InnerLoopVectorizer::vectorizeInterleaveGroup().

◆ ConstantFoldBinaryInstruction()

Constant * llvm::ConstantFoldBinaryInstruction ( unsigned  Opcode,
Constant V1,
Constant V2 
)

◆ ConstantFoldBinaryOpOperands()

Constant * llvm::ConstantFoldBinaryOpOperands ( unsigned  Opcode,
Constant LHS,
Constant RHS,
const DataLayout DL 
)

Attempt to constant fold a binary operation with the specified operands.

If it fails, it returns a constant expression of the specified operands.

Definition at line 1278 of file ConstantFolding.cpp.

References assert(), llvm::ConstantExpr::get(), and llvm::Instruction::isBinaryOp().

Referenced by ConstantFoldCompareInstOperands(), and foldOrCommuteConstant().

◆ ConstantFoldCall()

Constant * llvm::ConstantFoldCall ( const CallBase Call,
Function F,
ArrayRef< Constant * >  Operands,
const TargetLibraryInfo TLI = nullptr 
)

ConstantFoldCall - Attempt to constant fold a call to the specified function with the specified arguments, returning null if unsuccessful.

Definition at line 2377 of file ConstantFolding.cpp.

References F.

Referenced by llvm::Evaluator::EvaluateBlock(), and SimplifyCall().

◆ ConstantFoldCastInstruction()

Constant * llvm::ConstantFoldCastInstruction ( unsigned  opcode,
Constant V,
Type DestTy 
)

◆ ConstantFoldCastOperand()

Constant * llvm::ConstantFoldCastOperand ( unsigned  Opcode,
Constant C,
Type DestTy,
const DataLayout DL 
)

◆ ConstantFoldCompareInstOperands()

Constant * llvm::ConstantFoldCompareInstOperands ( unsigned  Predicate,
Constant LHS,
Constant RHS,
const DataLayout DL,
const TargetLibraryInfo TLI = nullptr 
)

ConstantFoldCompareInstOperands - Attempt to constant fold a compare instruction (icmp/fcmp) with the specified operands.

If it fails, it returns a constant expression of the specified operands.

Definition at line 1184 of file ConstantFolding.cpp.

References ConstantFoldBinaryOpOperands(), ConstantFoldCompareInstOperands(), llvm::ConstantExpr::getCompare(), llvm::ConstantExpr::getIntegerCast(), llvm::DataLayout::getIntPtrType(), llvm::Constant::getNullValue(), and llvm::Constant::isNullValue().

Referenced by ConstantFold(), ConstantFoldCompareInstOperands(), ConstantFoldInstruction(), EvaluateExpression(), getPredicateResult(), SimplifyFCmpInst(), SimplifyICmpInst(), and SimplifyWithOpReplaced().

◆ ConstantFoldCompareInstruction()

Constant * llvm::ConstantFoldCompareInstruction ( unsigned short  predicate,
Constant C1,
Constant C2 
)

◆ ConstantFoldConstant()

Constant * llvm::ConstantFoldConstant ( const Constant C,
const DataLayout DL,
const TargetLibraryInfo TLI = nullptr 
)

ConstantFoldConstant - Attempt to fold the constant using the specified DataLayout.

If successful, the constant result is returned, if not, null is returned.

Definition at line 1171 of file ConstantFolding.cpp.

Referenced by AddReachableCodeToWorklist(), llvm::VNCoercion::coerceAvailableValueToLoadTypeHelper(), evaluateBitcastFromPtr(), llvm::Evaluator::EvaluateBlock(), getShiftedValue(), OptimizeGlobalVars(), and SimplifyGEPInst().

◆ ConstantFoldExtractElementInstruction()

Constant * llvm::ConstantFoldExtractElementInstruction ( Constant Val,
Constant Idx 
)

Attempt to constant fold an extractelement instruction with the specified operands and indices.

The constant result is returned if successful; if not, null is returned.

Definition at line 788 of file ConstantFold.cpp.

References llvm::UndefValue::get(), llvm::Constant::getAggregateElement(), llvm::Constant::getNullValue(), llvm::Value::getType(), llvm::Type::getVectorElementType(), llvm::Type::getVectorNumElements(), Idx, and llvm::Constant::isNullValue().

Referenced by llvm::ConstantExpr::getExtractElement(), and SimplifyExtractElementInst().

◆ ConstantFoldExtractValueInstruction()

Constant * llvm::ConstantFoldExtractValueInstruction ( Constant Agg,
ArrayRef< unsigned Idxs 
)

Attempt to constant fold an extractvalue instruction with the specified operands and indices.

The constant result is returned if successful; if not, null is returned.

Definition at line 878 of file ConstantFold.cpp.

References ConstantFoldExtractValueInstruction(), and llvm::Constant::getAggregateElement().

Referenced by ConstantFoldExtractValueInstruction(), llvm::ConstantExpr::getExtractValue(), and SimplifyExtractValueInst().

◆ ConstantFoldGetElementPtr()

Constant * llvm::ConstantFoldGetElementPtr ( Type Ty,
Constant C,
bool  InBounds,
Optional< unsigned InRangeIndex,
ArrayRef< Value * >  Idxs 
)

◆ ConstantFoldInsertElementInstruction()

Constant * llvm::ConstantFoldInsertElementInstruction ( Constant Val,
Constant Elt,
Constant Idx 
)

Attempt to constant fold an insertelement instruction with the specified operands and indices.

The constant result is returned if successful; if not, null is returned.

Definition at line 807 of file ConstantFold.cpp.

References llvm::ConstantVector::get(), llvm::UndefValue::get(), llvm::ConstantInt::get(), llvm::Value::getContext(), llvm::ConstantExpr::getExtractElement(), llvm::IRBuilderBase::getInt32Ty(), llvm::Value::getType(), llvm::Type::getVectorNumElements(), llvm::ConstantInt::getZExtValue(), Idx, and llvm::ConstantInt::uge().

Referenced by llvm::ConstantExpr::getInsertElement(), and SimplifyInsertElementInst().

◆ ConstantFoldInsertValueInstruction()

Constant * llvm::ConstantFoldInsertValueInstruction ( Constant Agg,
Constant Val,
ArrayRef< unsigned Idxs 
)

ConstantFoldInsertValueInstruction - Attempt to constant fold an insertvalue instruction with the specified operands and indices.

The constant result is returned if successful; if not, null is returned.

Definition at line 890 of file ConstantFold.cpp.

References ConstantFoldInsertValueInstruction(), llvm::ConstantVector::get(), llvm::ConstantArray::get(), llvm::ConstantStruct::get(), llvm::Constant::getAggregateElement(), and llvm::Value::getType().

Referenced by ConstantFoldInsertValueInstruction(), llvm::ConstantExpr::getInsertValue(), and SimplifyInsertValueInst().

◆ ConstantFoldInstOperands()

Constant * llvm::ConstantFoldInstOperands ( Instruction I,
ArrayRef< Constant * >  Ops,
const DataLayout DL,
const TargetLibraryInfo TLI = nullptr 
)

ConstantFoldInstOperands - Attempt to constant fold an instruction with the specified operands.

If successful, the constant result is returned, if not, null is returned. Note that this function can fail when attempting to fold instructions like loads and stores, which have no constant expression form.

Definition at line 1177 of file ConstantFolding.cpp.

References I.

Referenced by ConstantFold(), ConstantFoldInstruction(), EvaluateExpression(), and SimplifyWithOpReplaced().

◆ ConstantFoldInstruction()

Constant * llvm::ConstantFoldInstruction ( Instruction I,
const DataLayout DL,
const TargetLibraryInfo TLI = nullptr 
)

ConstantFoldInstruction - Try to constant fold the specified instruction.

If successful, the constant result is returned, if not, null is returned. Note that this fails if not all of the operands are constant. Otherwise, this function can only fail when attempting to fold instructions like loads and stores, which have no constant expression form.

Definition at line 1100 of file ConstantFolding.cpp.

References ConstantFoldCompareInstOperands(), ConstantFoldInstOperands(), llvm::UndefValue::get(), llvm::ConstantExpr::getExtractValue(), llvm::ConstantExpr::getInsertValue(), and I.

Referenced by AddReachableCodeToWorklist(), CleanupConstantGlobalUsers(), ConstantPropUsersOf(), hoistRegion(), llvm::JumpThreadingPass::ProcessBlock(), llvm::InstCombiner::run(), and SimplifyInstruction().

◆ ConstantFoldLoadFromConstPtr()

Constant * llvm::ConstantFoldLoadFromConstPtr ( Constant C,
Type Ty,
const DataLayout DL 
)

◆ ConstantFoldLoadThroughBitcast()

Constant * llvm::ConstantFoldLoadThroughBitcast ( Constant C,
Type DestTy,
const DataLayout DL 
)

ConstantFoldLoadThroughBitcast - try to cast constant to destination type returning null if unsuccessful.

Can cast pointer to pointer or pointer to integer and vice versa if their sizes are equal.

Definition at line 323 of file ConstantFolding.cpp.

References llvm::CastInst::castIsValid(), llvm::ConstantExpr::getCast(), llvm::Value::getType(), llvm::DataLayout::getTypeSizeInBits(), llvm::Type::isAggregateType(), llvm::Type::isIntegerTy(), llvm::Type::isPointerTy(), and llvm::Type::isStructTy().

Referenced by llvm::Evaluator::castCallResultIfNeeded(), llvm::Evaluator::EvaluateBlock(), llvm::Evaluator::getCalleeWithFormalArgs(), and llvm::Evaluator::getFormalParams().

◆ ConstantFoldLoadThroughGEPConstantExpr()

Constant * llvm::ConstantFoldLoadThroughGEPConstantExpr ( Constant C,
ConstantExpr CE 
)

ConstantFoldLoadThroughGEPConstantExpr - Given a constant and a getelementptr constantexpr, return the constant value being addressed by the constant expression, or null if something is funny and we can't decide.

Definition at line 1350 of file ConstantFolding.cpp.

References llvm::User::getNumOperands(), and llvm::User::getOperand().

Referenced by CleanupConstantGlobalUsers(), ConstantFoldLoadFromConstPtr(), and isSimpleEnoughPointerToCommit().

◆ ConstantFoldLoadThroughGEPIndices()

Constant * llvm::ConstantFoldLoadThroughGEPIndices ( Constant C,
ArrayRef< Constant * >  Indices 
)

ConstantFoldLoadThroughGEPIndices - Given a constant and getelementptr indices (with an implied zero pointer index that is not in the list), return the constant value being addressed by a virtual load, or null if something is funny and we can't decide.

Definition at line 1366 of file ConstantFolding.cpp.

◆ ConstantFoldSelectInstruction()

Constant * llvm::ConstantFoldSelectInstruction ( Constant Cond,
Constant V1,
Constant V2 
)

Attempt to constant fold a select instruction with the specified operands.

The constant result is returned if successful; if not, null is returned.

Definition at line 733 of file ConstantFold.cpp.

References llvm::ConstantVector::get(), llvm::IntegerType::get(), llvm::ConstantInt::get(), llvm::ConstantExpr::getExtractElement(), llvm::User::getOperand(), llvm::ConstantExpr::getSelect(), llvm::Value::getType(), and llvm::Type::getVectorNumElements().

Referenced by llvm::ConstantExpr::getSelect(), and SimplifySelectInst().

◆ ConstantFoldShuffleVectorInstruction()

Constant * llvm::ConstantFoldShuffleVectorInstruction ( Constant V1,
Constant V2,
Constant Mask 
)

◆ ConstantFoldTerminator()

bool llvm::ConstantFoldTerminator ( BasicBlock BB,
bool  DeleteDeadConditions = false,
const TargetLibraryInfo TLI = nullptr,
DomTreeUpdater DTU = nullptr 
)

If a terminator instruction is predicated on a constant value, convert it into an unconditional branch to the constant destination.

ConstantFoldTerminator - If a terminator instruction is predicated on a constant value, convert it into an unconditional branch to the constant destination.

This is a nontrivial operation because the successors of this basic block must have their PHI nodes updated. Also calls RecursivelyDeleteTriviallyDeadInstructions() on any branch/switch conditions and indirectbr addresses this might make dead if DeleteDeadConditions is true.

Definition at line 109 of file Local.cpp.

References Address, llvm::DomTreeUpdater::applyUpdatesPermissive(), assert(), llvm::IRBuilder< T, Inserter >::CreateBr(), llvm::IRBuilder< T, Inserter >::CreateCondBr(), llvm::IRBuilder< T, Inserter >::CreateICmpEQ(), llvm::Instruction::eraseFromParent(), llvm::BasicBlock::getContext(), llvm::BasicBlock::getFirstNonPHIOrDbg(), llvm::MDNode::getNumOperands(), llvm::MDNode::getOperand(), llvm::BasicBlock::getParent(), llvm::BasicBlock::getTerminator(), llvm::ConstantInt::getValue(), llvm::LLVMContext::MD_make_implicit, llvm::LLVMContext::MD_prof, RecursivelyDeleteTriviallyDeadInstructions(), llvm::BasicBlock::removePredecessor(), llvm::Instruction::setMetadata(), and successors().

Referenced by CloneAndPruneIntoFromInst(), markAliveBlocks(), llvm::JumpThreadingPass::ProcessBlock(), processSwitch(), and runIPSCCP().

◆ ConstantFoldUnaryInstruction()

Constant * llvm::ConstantFoldUnaryInstruction ( unsigned  Opcode,
Constant V 
)

◆ ConstantFoldUnaryOpOperand()

Constant * llvm::ConstantFoldUnaryOpOperand ( unsigned  Opcode,
Constant Op,
const DataLayout DL 
)

Attempt to constant fold a unary operation with the specified operand.

If it fails, it returns a constant expression of the specified operands.

Definition at line 1271 of file ConstantFolding.cpp.

References assert(), llvm::ConstantExpr::get(), and llvm::Instruction::isUnaryOp().

Referenced by foldConstant().

◆ consumeError()

void llvm::consumeError ( Error  Err)
inline

Consume a Error without doing anything.

This method should be used only where an error can be considered a reasonable and expected return value.

Uses of this method are potentially indicative of design problems: If it's legitimate to do nothing while processing an "error", the error-producer might be more clearly refactored to return an Optional<T>.

Definition at line 981 of file Error.h.

References handleAllErrors().

Referenced by llvm::DWARFDie::addressRangeContainsAddress(), llvm::DWARFDie::collectChildrenAddressRanges(), llvm::codeview::computeTypeName(), llvm::sys::fs::TempFile::create(), createOnDiskBuffer(), error(), errorToBool(), llvm::codeview::FieldListDeserializer::FieldListDeserializer(), llvm::pdb::SymbolCache::findSymbolByTypeIndex(), getAccelTable(), llvm::pdb::NativeExeSymbol::getAge(), getDbiStreamPtr(), llvm::DWARFContext::getDWOContext(), llvm::codeview::LazyRandomTypeCollection::getFirst(), llvm::pdb::NativeExeSymbol::getGuid(), llvm::pdb::NativeSession::getInjectedSources(), llvm::codeview::LazyRandomTypeCollection::getNext(), llvm::sys::Process::getPageSizeEstimate(), llvm::codeview::LazyRandomTypeCollection::getTypeName(), getUdtOptions(), llvm::pdb::NativeExeSymbol::hasCTypes(), llvm::pdb::PDBFile::hasPDBGlobalsStream(), llvm::pdb::PDBFile::hasPDBInjectedSourceStream(), llvm::pdb::PDBFile::hasPDBPublicsStream(), llvm::pdb::PDBFile::hasPDBStringTable(), llvm::pdb::NativeExeSymbol::hasPrivateSymbols(), LLVMConsumeError(), llvm::lto::localCache(), llvm::MSVCPExpected< T >::MSVCPExpected(), llvm::VarStreamArrayIterator< ValueType, Extractor >::operator+=(), llvm::FixedStreamArray< T >::operator[](), llvm::pdb::PDBFile::parseFileHeaders(), llvm::BinaryStreamReader::peek(), PrintNoMatch(), llvm::pdb::TpiStream::reload(), llvm::codeview::LazyRandomTypeCollection::tryGetType(), llvm::DWARFUnit::updateAddressDieMap(), llvm::VarStreamArrayIterator< ValueType, Extractor >::VarStreamArrayIterator(), llvm::codeview::SymbolSerializer::writeOneSymbol(), llvm::detail::ErrorAdapter::~ErrorAdapter(), and llvm::codeview::FieldListDeserializer::~FieldListDeserializer().

◆ containsIrreducibleCFG()

template<class NodeT , class RPOTraversalT , class LoopInfoT , class GT = GraphTraits<NodeT>>
bool llvm::containsIrreducibleCFG ( RPOTraversalT &  RPOTraversal,
const LoopInfoT &  LI 
)

Return true if the control flow in RPOTraversal is irreducible.

This is a generic implementation to detect CFG irreducibility based on loop info analysis. It can be used for any kind of CFG (Loop, MachineLoop, Function, MachineFunction, etc.) by providing an RPO traversal (RPOTraversal) and the loop info analysis (LI) of the CFG. This utility function is only recommended when loop info analysis is available. If loop info analysis isn't available, please, don't compute it explicitly for this purpose. There are more efficient ways to detect CFG irreducibility that don't require recomputing loop info analysis (e.g., T1/T2 or Tarjan's algorithm).

Requirements: 1) GraphTraits must be implemented for NodeT type. It is used to access NodeT successors. target CFG with begin()/end() iterator interfaces. 3) LI must be a valid LoopInfoBase that contains up-to-date loop analysis information of the CFG.

This algorithm uses the information about reducible loop back-edges already computed in LI. When a back-edge is found during the RPO traversal, the algorithm checks whether the back-edge is one of the reducible back-edges in loop info. If it isn't, the CFG is irreducible. For example, for the CFG below (canonical irreducible graph) loop info won't contain any loop, so the algorithm will return that the CFG is irreducible when checking the B <- -> C back-edge.

(A->B, A->C, B->C, C->B, C->D) A / \ B<- ->C | D

Check whether the edge (Src, Dst) is a reducible loop backedge according to LI. I.e., check if there exists a loop that contains Src and where Dst is the loop header.

Definition at line 143 of file CFG.h.

◆ ConvertCodePointToUTF8()

bool llvm::ConvertCodePointToUTF8 ( unsigned  Source,
char *&  ResultPtr 
)

Convert an Unicode code point to UTF8 sequence.

Parameters
Sourcea Unicode code point.
[in,out]ResultPtrpointer to the output buffer, needs to be at least UNI_MAX_UTF8_BYTES_PER_CODE_POINT bytes. On success ResultPtr is updated one past end of the converted sequence.
Returns
true on success.

Definition at line 65 of file ConvertUTFWrapper.cpp.

References conversionOK, ConvertUTF32toUTF8(), and strictConversion.

◆ ConvertDebugDeclareToDebugValue() [1/3]

void llvm::ConvertDebugDeclareToDebugValue ( DbgVariableIntrinsic DII,
LoadInst LI,
DIBuilder Builder 
)

Inserts a llvm.dbg.value intrinsic before a load of an alloca'd value that has an associated llvm.dbg.declare or llvm.dbg.addr intrinsic.

Definition at line 1336 of file Local.cpp.

References assert(), dbgs(), getDebugValueLoc(), llvm::DbgVariableIntrinsic::getExpression(), llvm::Value::getType(), llvm::DbgVariableIntrinsic::getVariable(), llvm::Instruction::insertAfter(), LdStHasDebugValue(), LLVM_DEBUG, and valueCoversEntireFragment().

◆ ConvertDebugDeclareToDebugValue() [2/3]

void llvm::ConvertDebugDeclareToDebugValue ( DbgVariableIntrinsic DII,
PHINode LI,
DIBuilder Builder 
)

◆ ConvertDebugDeclareToDebugValue() [3/3]

void llvm::ConvertDebugDeclareToDebugValue ( DbgVariableIntrinsic DII,
StoreInst SI,
DIBuilder Builder 
)

===------------------------------------------------------------------—===// Dbg Intrinsic utilities

Inserts a llvm.dbg.value intrinsic before a store to an alloca'd value that has an associated llvm.dbg.declare or llvm.dbg.addr intrinsic.

Definition at line 1306 of file Local.cpp.

References assert(), dbgs(), llvm::UndefValue::get(), getDebugValueLoc(), llvm::DbgVariableIntrinsic::getExpression(), llvm::Value::getType(), llvm::StoreInst::getValueOperand(), llvm::DbgVariableIntrinsic::getVariable(), llvm::DbgVariableIntrinsic::isAddressOfVariable(), LdStHasDebugValue(), LLVM_DEBUG, and valueCoversEntireFragment().

Referenced by LowerDbgDeclare(), promoteSingleBlockAlloca(), rewriteSingleStoreAlloca(), and llvm::InstCombiner::visitAllocSite().

◆ convertPointerToIntegerType()

static Type * llvm::convertPointerToIntegerType ( const DataLayout DL,
Type Ty 
)
static

◆ convertToDeclaration()

bool llvm::convertToDeclaration ( GlobalValue GV)

◆ ConvertUTF16toUTF32()

ConversionResult llvm::ConvertUTF16toUTF32 ( const UTF16 **  sourceStart,
const UTF16 sourceEnd,
UTF32 **  targetStart,
UTF32 targetEnd,
ConversionFlags  flags 
)

◆ ConvertUTF16toUTF8()

ConversionResult llvm::ConvertUTF16toUTF8 ( const UTF16 **  sourceStart,
const UTF16 sourceEnd,
UTF8 **  targetStart,
UTF8 targetEnd,
ConversionFlags  flags 
)

◆ convertUTF16ToUTF8String() [1/2]

bool llvm::convertUTF16ToUTF8String ( ArrayRef< char SrcBytes,
std::string &  Out 
)

Converts a stream of raw bytes assumed to be UTF16 into a UTF8 std::string.

Parameters
[in]SrcBytesA buffer of what is assumed to be UTF-16 encoded text.
[out]OutConverted UTF-8 is stored here on success.
Returns
true on success

Definition at line 86 of file ConvertUTFWrapper.cpp.

References assert(), conversionOK, ConvertUTF16toUTF8(), I, strictConversion, llvm::sys::SwapByteOrder_16(), targetExhausted, UNI_MAX_UTF8_BYTES_PER_CODE_POINT, UNI_UTF16_BYTE_ORDER_MARK_NATIVE, and UNI_UTF16_BYTE_ORDER_MARK_SWAPPED.

Referenced by convertUTF16ToUTF8String(), convertWideToUTF8(), ExpandResponseFile(), llvm::pdb::DIARawSymbol::getUndecoratedNameEx(), and invokeBstrMethod().

◆ convertUTF16ToUTF8String() [2/2]

bool llvm::convertUTF16ToUTF8String ( ArrayRef< UTF16 Src,
std::string &  Out 
)

Converts a UTF16 string into a UTF8 std::string.

Parameters
[in]SrcA buffer of UTF-16 encoded text.
[out]OutConverted UTF-8 is stored here on success.
Returns
true on success

Definition at line 135 of file ConvertUTFWrapper.cpp.

References convertUTF16ToUTF8String().

◆ ConvertUTF32toUTF16()

ConversionResult llvm::ConvertUTF32toUTF16 ( const UTF32 **  sourceStart,
const UTF32 sourceEnd,
UTF16 **  targetStart,
UTF16 targetEnd,
ConversionFlags  flags 
)

◆ ConvertUTF32toUTF8()

ConversionResult llvm::ConvertUTF32toUTF8 ( const UTF32 **  sourceStart,
const UTF32 sourceEnd,
UTF8 **  targetStart,
UTF8 targetEnd,
ConversionFlags  flags 
)

◆ convertUTF8Sequence()

ConversionResult llvm::convertUTF8Sequence ( const UTF8 **  source,
const UTF8 sourceEnd,
UTF32 target,
ConversionFlags  flags 
)
inline

Convert the first UTF8 sequence in the given source buffer to a UTF32 code point.

Parameters
[in,out]sourceA pointer to the source buffer. If the conversion succeeds, this pointer will be updated to point to the byte just past the end of the converted sequence.
sourceEndA pointer just past the end of the source buffer.
[out]targetThe converted code
flagsWhether the conversion is strict or lenient.
Returns
conversionOK on success
See also
ConvertUTF8toUTF32

Definition at line 245 of file ConvertUTF.h.

References ConvertUTF8toUTF32(), getNumBytesForUTF8(), and sourceExhausted.

◆ ConvertUTF8toUTF16()

ConversionResult llvm::ConvertUTF8toUTF16 ( const UTF8 **  sourceStart,
const UTF8 sourceEnd,
UTF16 **  targetStart,
UTF16 targetEnd,
ConversionFlags  flags 
)

◆ convertUTF8ToUTF16String()

bool llvm::convertUTF8ToUTF16String ( StringRef  SrcUTF8,
SmallVectorImpl< UTF16 > &  DstUTF16 
)

◆ ConvertUTF8toUTF32()

ConversionResult llvm::ConvertUTF8toUTF32 ( const UTF8 **  sourceStart,
const UTF8 sourceEnd,
UTF32 **  targetStart,
UTF32 targetEnd,
ConversionFlags  flags 
)

Convert a partial UTF8 sequence to UTF32.

If the sequence ends in an incomplete code unit sequence, returns sourceIllegal.

Definition at line 710 of file ConvertUTF.cpp.

References ConvertUTF8toUTF32Impl().

Referenced by chopOneUTF32(), llvm::sys::unicode::columnWidthUTF8(), convertUTF8Sequence(), ConvertUTF8toWide(), and llvm::json::fixUTF8().

◆ ConvertUTF8toUTF32Impl()

static ConversionResult llvm::ConvertUTF8toUTF32Impl ( const UTF8 **  sourceStart,
const UTF8 sourceEnd,
UTF32 **  targetStart,
UTF32 targetEnd,
ConversionFlags  flags,
Boolean  InputIsPartial 
)
static

◆ ConvertUTF8toUTF32Partial()

ConversionResult llvm::ConvertUTF8toUTF32Partial ( const UTF8 **  sourceStart,
const UTF8 sourceEnd,
UTF32 **  targetStart,
UTF32 targetEnd,
ConversionFlags  flags 
)

Convert a partial UTF8 sequence to UTF32.

If the sequence ends in an incomplete code unit sequence, returns sourceExhausted.

Definition at line 701 of file ConvertUTF.cpp.

References ConvertUTF8toUTF32Impl().

◆ ConvertUTF8toWide() [1/3]

bool llvm::ConvertUTF8toWide ( const char Source,
std::wstring &  Result 
)

Converts a UTF-8 C-string to a std::wstring.

Returns
true on success.

Definition at line 205 of file ConvertUTFWrapper.cpp.

References ConvertUTF8toWide().

◆ ConvertUTF8toWide() [2/3]

bool llvm::ConvertUTF8toWide ( llvm::StringRef  Source,
std::wstring &  Result 
)

Converts a UTF-8 StringRef to a std::wstring.

Returns
true on success.

Definition at line 201 of file ConvertUTFWrapper.cpp.

References ConvertUTF8toWideInternal().

◆ ConvertUTF8toWide() [3/3]

bool llvm::ConvertUTF8toWide ( unsigned  WideCharWidth,
llvm::StringRef  Source,
char *&  ResultPtr,
const UTF8 *&  ErrorPtr 
)

Convert an UTF8 StringRef to UTF8, UTF16, or UTF32 depending on WideCharWidth.

The converted data is written to ResultPtr, which needs to point to at least WideCharWidth * (Source.Size() + 1) bytes. On success, ResultPtr will point one after the end of the copied string. On failure, ResultPtr will not be changed, and ErrorPtr will be set to the location of the first character which could not be converted.

Returns
true on success.

Definition at line 19 of file ConvertUTFWrapper.cpp.

References assert(), conversionOK, ConvertUTF8toUTF16(), ConvertUTF8toUTF32(), isLegalUTF8String(), sourceIllegal, strictConversion, and targetExhausted.

Referenced by ConvertUTF8toWide(), and ConvertUTF8toWideInternal().

◆ ConvertUTF8toWideInternal()

template<typename TResult >
static bool llvm::ConvertUTF8toWideInternal ( llvm::StringRef  Source,
TResult &  Result 
)
inlinestatic

Definition at line 185 of file ConvertUTFWrapper.cpp.

References ConvertUTF8toWide().

Referenced by ConvertUTF8toWide().

◆ convertWideToUTF8()

bool llvm::convertWideToUTF8 ( const std::wstring &  Source,
std::string &  Result 
)

Converts a std::wstring to a UTF-8 encoded std::string.

Returns
true on success.

Definition at line 213 of file ConvertUTFWrapper.cpp.

References conversionOK, convertUTF16ToUTF8String(), ConvertUTF32toUTF8(), isLegalUTF8String(), llvm_unreachable, strictConversion, and UNI_MAX_UTF8_BYTES_PER_CODE_POINT.

◆ copyNonnullMetadata()

void llvm::copyNonnullMetadata ( const LoadInst OldLI,
MDNode N,
LoadInst NewLI 
)

Copy a nonnull metadata node to a new load instruction.

This handles mapping it to range metadata if the new load is an integer load instead of a pointer load.

Definition at line 2506 of file Local.cpp.

References llvm::MDBuilder::createRange(), llvm::ConstantPointerNull::get(), llvm::ConstantInt::get(), llvm::ConstantExpr::getAdd(), llvm::Value::getContext(), llvm::LoadInst::getPointerOperand(), llvm::ConstantExpr::getPtrToInt(), llvm::Value::getType(), llvm::LLVMContext::MD_nonnull, llvm::LLVMContext::MD_range, N, and llvm::Instruction::setMetadata().

Referenced by combineLoadToNewType().

◆ copyRangeMetadata()

void llvm::copyRangeMetadata ( const DataLayout DL,
const LoadInst OldLI,
MDNode N,
LoadInst NewLI 
)

Copy a range metadata node to a new load instruction.

This handles mapping it to nonnull metadata if the new load is a pointer load instead of an integer load and the range doesn't cover null.

Definition at line 2531 of file Local.cpp.

References llvm::ConstantRange::contains(), llvm::MDNode::get(), getConstantRangeFromMetadata(), llvm::Value::getContext(), llvm::DataLayout::getIndexTypeSizeInBits(), llvm::Value::getType(), llvm::LLVMContext::MD_nonnull, None, and llvm::Instruction::setMetadata().

Referenced by combineLoadToNewType().

◆ countLeadingOnes()

template<typename T >
unsigned llvm::countLeadingOnes ( Value,
ZeroBehavior  ZB = ZB_Width 
)

Count the number of ones from the most significant bit to the first zero bit.

Ex. countLeadingOnes(0xFF0FFF00) == 8. Only unsigned integral types are allowed.

Parameters
ZBthe behavior on an input of all ones. Only ZB_Width and ZB_Undefined are valid arguments.

Definition at line 461 of file MathExtras.h.

◆ countLeadingZeros()

template<typename T >
unsigned llvm::countLeadingZeros ( Val,
ZeroBehavior  ZB = ZB_Width 
)

◆ countPopulation()

template<typename T >
unsigned llvm::countPopulation ( Value)
inline

Count the number of set bits in a value.

Ex. countPopulation(0xF000F000) = 8 Returns 0 if the word is zero.

Definition at line 519 of file MathExtras.h.

Referenced by eliminateDeadSwitchCases(), and readGSIHashBuckets().

◆ countTrailingOnes()

template<typename T >
unsigned llvm::countTrailingOnes ( Value,
ZeroBehavior  ZB = ZB_Width 
)

Count the number of ones from the least significant bit to the first zero bit.

Ex. countTrailingOnes(0x00FF00FF) == 8. Only unsigned integral types are allowed.

Parameters
ZBthe behavior on an input of all ones. Only ZB_Width and ZB_Undefined are valid arguments.

Definition at line 477 of file MathExtras.h.

Referenced by computeKnownBitsMul().

◆ countTrailingZeros()

template<typename T >
unsigned llvm::countTrailingZeros ( Val,
ZeroBehavior  ZB = ZB_Width 
)

Count number of 0's from the least significant bit to the most stopping at the first 1.

Only unsigned integral types are allowed.

Parameters
ZBthe behavior on an input of 0. Only ZB_Width and ZB_Undefined are valid arguments.

Definition at line 119 of file MathExtras.h.

Referenced by llvm::lowertypetests::BitSetBuilder::build(), computeKnownBits(), computeKnownBitsFromOperator(), llvm::ScaledNumbers::divide64(), dumpApplePropertyAttribute(), findFirstSet(), llvm::wholeprogramdevirt::findLowestOffset(), ReduceSwitchRange(), and TypeSizeToSizeIndex().

◆ crc32()

uint32_t llvm::crc32 ( uint32_t  CRC,
StringRef  S 
)

zlib independent CRC32 calculation.

Definition at line 65 of file CRC.cpp.

◆ createAAEvalPass()

aa Exhaustive Alias Analysis Precision true FunctionPass * llvm::createAAEvalPass ( )

Create a wrapper of the above for the legacy pass manager.

Definition at line 434 of file AliasAnalysisEvaluator.cpp.

◆ createAAResultsWrapperPass()

Function Alias Analysis true FunctionPass * llvm::createAAResultsWrapperPass ( )

Definition at line 767 of file AliasAnalysis.cpp.

◆ createAddDiscriminatorsPass()

add Add DWARF path false FunctionPass * llvm::createAddDiscriminatorsPass ( )

Definition at line 108 of file AddDiscriminators.cpp.

Referenced by LLVMAddAddDiscriminatorsPass().

◆ createAddressSanitizerFunctionPass()

FunctionPass * llvm::createAddressSanitizerFunctionPass ( bool  CompileKernel = false,
bool  Recover = false,
bool  UseAfterScope = false 
)

◆ createAggressiveDCEPass()

Aggressive Dead Code false FunctionPass * llvm::createAggressiveDCEPass ( )

Definition at line 738 of file ADCE.cpp.

Referenced by LLVMAddAggressiveDCEPass().

◆ createAggressiveInstCombinerPass()

FunctionPass * llvm::createAggressiveInstCombinerPass ( )

Definition at line 345 of file AggressiveInstCombine.cpp.

Referenced by LLVMAddAggressiveInstCombinerPass().

◆ createAlignmentFromAssumptionsPass()

false FunctionPass * llvm::createAlignmentFromAssumptionsPass ( )

◆ createAlwaysInlinerLegacyPass()

always Inliner for always_inline false Pass * llvm::createAlwaysInlinerLegacyPass ( bool  InsertLifetime = true)

Create a legacy pass manager instance of a pass to inline and remove functions marked as "always_inline".

Definition at line 137 of file AlwaysInliner.cpp.

Referenced by LLVMAddAlwaysInlinerPass().

◆ createArgumentPromotionPass()

Promote by reference arguments to false Pass * llvm::createArgumentPromotionPass ( unsigned  maxElements = 3)

createArgumentPromotionPass - This pass promotes "by reference" arguments to be passed by value if the number of elements passed is smaller or equal to maxElements (maxElements == 0 means always promote).

Definition at line 1111 of file ArgumentPromotion.cpp.

Referenced by LLVMAddArgumentPromotionPass(), and llvm::PassManagerBuilder::populateModulePassManager().

◆ createAsmStreamer()

MCStreamer * llvm::createAsmStreamer ( MCContext &  Ctx,
std::unique_ptr< formatted_raw_ostream OS,
bool  isVerboseAsm,
bool  useDwarfDirectory,
MCInstPrinter *  InstPrint,
std::unique_ptr< MCCodeEmitter > &&  CE,
std::unique_ptr< MCAsmBackend > &&  TAB,
bool  ShowInst 
)

Create a machine code streamer which will print out assembly for the native target, suitable for compiling with a native assembler.

Parameters
InstPrint- If given, the instruction printer to use. If not given the MCInst representation will be printed. This method takes ownership of InstPrint.
CE- If given, a code emitter to use to show the instruction encoding inline with the assembly. This method takes ownership of CE.
TAB- If given, a target asm backend to use to show the fixup information in conjunction with encoding information. This method takes ownership of TAB.
ShowInst- Whether to show the MCInst representation inline with the assembly.

Referenced by llvm::Target::createAsmStreamer().

◆ createAttributorLegacyPass()

Pass * llvm::createAttributorLegacyPass ( )

◆ createBarrierNoopPass()

ModulePass * llvm::createBarrierNoopPass ( )

createBarrierNoopPass - This pass is purely a module pass barrier in a pass manager.

Definition at line 42 of file BarrierNoopPass.cpp.

Referenced by addCoroutineOpt0Passes(), and llvm::PassManagerBuilder::populateModulePassManager().

◆ createBasicAAWrapperPass()

Basic Alias true FunctionPass * llvm::createBasicAAWrapperPass ( )

Definition at line 2045 of file BasicAliasAnalysis.cpp.

Referenced by LLVMAddBasicAliasAnalysisPass().

◆ createBitMaskForGaps()

Constant * llvm::createBitMaskForGaps ( IRBuilder<> &  Builder,
unsigned  VF,
const InterleaveGroup< Instruction > &  Group 
)

Create a mask that filters the members of an interleave group where there are gaps.

For example, the mask for Group with interleave-factor 3 and VF 4, that has only its first member present is:

<1,0,0,1,0,0,1,0,0,1,0,0>

Note: The result is a mask of 0's and 1's, as opposed to the other create[*]Mask() utilities which create a shuffle mask (mask that consists of indices).

Definition at line 636 of file VectorUtils.cpp.

References assert(), llvm::ConstantVector::get(), llvm::InterleaveGroup< InstTy >::getFactor(), llvm::IRBuilderBase::getInt1(), llvm::InterleaveGroup< InstTy >::getMember(), llvm::InterleaveGroup< InstTy >::getNumMembers(), and llvm::InterleaveGroup< InstTy >::isReverse().

Referenced by llvm::InnerLoopVectorizer::vectorizeInterleaveGroup().

◆ createBitTrackingDCEPass()

Bit Tracking Dead Code false FunctionPass * llvm::createBitTrackingDCEPass ( )

Definition at line 183 of file BDCE.cpp.

Referenced by LLVMAddBitTrackingDCEPass().

◆ createBlockExtractorPass() [1/3]

ModulePass * llvm::createBlockExtractorPass ( )

createBlockExtractorPass - This pass extracts all the specified blocks from the functions in the module.

◆ createBlockExtractorPass() [2/3]

ModulePass * llvm::createBlockExtractorPass ( const SmallVectorImpl< BasicBlock * > &  BlocksToExtract,
bool  EraseFunctions 
)

Definition at line 95 of file BlockExtractor.cpp.

◆ createBlockExtractorPass() [3/3]

ModulePass * llvm::createBlockExtractorPass ( const SmallVectorImpl< SmallVector< BasicBlock *, 16 > > &  GroupsOfBlocksToExtract,
bool  EraseFunctions 
)

Definition at line 99 of file BlockExtractor.cpp.

◆ createBoundsCheckingLegacyPass()

bounds Run time bounds false FunctionPass * llvm::createBoundsCheckingLegacyPass ( )

Legacy pass creation function for the above pass.

Definition at line 246 of file BoundsChecking.cpp.

◆ createBreakCriticalEdgesPass()

FunctionPass * llvm::createBreakCriticalEdgesPass ( )

◆ createCalledValuePropagationPass()

ModulePass * llvm::createCalledValuePropagationPass ( )

createCalledValuePropagationPass - Attach metadata to indirct call sites indicating the set of functions they may target at run-time.

Referenced by LLVMAddCalledValuePropagationPass(), and llvm::PassManagerBuilder::populateModulePassManager().

◆ createCallGraphDOTPrinterPass()

ModulePass * llvm::createCallGraphDOTPrinterPass ( )

Definition at line 89 of file CallPrinter.cpp.

◆ createCallGraphViewerPass()

ModulePass * llvm::createCallGraphViewerPass ( )

◆ createCallSiteSplittingPass()

callsite Call site false FunctionPass * llvm::createCallSiteSplittingPass ( )

◆ createCanonicalizeAliasesPass()

ModulePass * llvm::createCanonicalizeAliasesPass ( )

◆ createCFGOnlyPrinterLegacyPassPass()

FunctionPass * llvm::createCFGOnlyPrinterLegacyPassPass ( )

Definition at line 197 of file CFGPrinter.cpp.

◆ createCFGPrinterLegacyPassPass()

FunctionPass * llvm::createCFGPrinterLegacyPassPass ( )

Definition at line 193 of file CFGPrinter.cpp.

◆ createCFGSimplificationPass()

Simplify the false FunctionPass * llvm::createCFGSimplificationPass ( unsigned  Threshold = 1,
bool  ForwardSwitchCond = false,
bool  ConvertSwitch = false,
bool  KeepLoops = true,
bool  SinkCommon = false,
std::function< bool(const Function &)>  Ftor = nullptr 
)

◆ createCFLAndersAAWrapperPass()

ImmutablePass * llvm::createCFLAndersAAWrapperPass ( )

◆ createCFLSteensAAWrapperPass()

ImmutablePass * llvm::createCFLSteensAAWrapperPass ( )

◆ createCGSCCToFunctionPassAdaptor()

template<typename FunctionPassT >
CGSCCToFunctionPassAdaptor< FunctionPassT > llvm::createCGSCCToFunctionPassAdaptor ( FunctionPassT  Pass)

A function to deduce a function pass type and wrap it in the templated adaptor.

Definition at line 533 of file CGSCCPassManager.h.

Referenced by llvm::PassBuilder::buildModuleSimplificationPipeline().

◆ createConstantHoistingPass()

Constant false FunctionPass * llvm::createConstantHoistingPass ( )

Definition at line 137 of file ConstantHoisting.cpp.

◆ createConstantMergePass()

ModulePass * llvm::createConstantMergePass ( )

createConstantMergePass - This function returns a new pass that merges duplicate global constants together into a single constant that is shared.

This is useful because some passes (ie TraceValues) insert a lot of string constants into the program, regardless of whether or not they duplicate an existing string.

Referenced by LLVMAddConstantMergePass(), and llvm::PassManagerBuilder::populateModulePassManager().

◆ createConstantPropagationPass()

Simple constant false FunctionPass * llvm::createConstantPropagationPass ( )

Definition at line 63 of file ConstantProp.cpp.

Referenced by LLVMAddConstantPropagationPass().

◆ createControlHeightReductionLegacyPass()

Reduce control height in the hot false FunctionPass * llvm::createControlHeightReductionLegacyPass ( )

Definition at line 138 of file ControlHeightReduction.cpp.

◆ createCoroCleanupPass()

Pass * llvm::createCoroCleanupPass ( )

Lower all remaining coroutine intrinsics.

Referenced by addCoroutineOpt0Passes(), addCoroutineOptimizerLastPasses(), and LLVMAddCoroCleanupPass().

◆ createCoroEarlyPass()

Pass * llvm::createCoroEarlyPass ( )

Lower coroutine intrinsics that are not needed by later passes.

Referenced by addCoroutineEarlyPasses(), and LLVMAddCoroEarlyPass().

◆ createCoroElidePass()

coro Coroutine frame allocation elision and indirect calls false Pass * llvm::createCoroElidePass ( )

Analyze coroutines use sites, devirtualize resume/destroy calls and elide heap allocation for coroutine frame where possible.

Definition at line 343 of file CoroElide.cpp.

Referenced by addCoroutineOpt0Passes(), addCoroutineScalarOptimizerPasses(), and LLVMAddCoroElidePass().

◆ createCoroSplitPass()

coro Split coroutine into a set of functions driving its state false Pass * llvm::createCoroSplitPass ( )

Split up coroutines into multiple functions driving their state machines.

Definition at line 959 of file CoroSplit.cpp.

Referenced by addCoroutineOpt0Passes(), addCoroutineSCCPasses(), and LLVMAddCoroSplitPass().

◆ createCorrelatedValuePropagationPass()

correlated Value false Pass * llvm::createCorrelatedValuePropagationPass ( )

◆ createCostModelAnalysisPass()

FunctionPass * llvm::createCostModelAnalysisPass ( )

Definition at line 78 of file CostModel.cpp.

◆ createCrossDSOCFIPass()

ModulePass * llvm::createCrossDSOCFIPass ( )

This pass export CFI checks for use by external modules.

Referenced by llvm::PassManagerBuilder::populateLTOPassManager().

◆ createDataFlowSanitizerPass()

ModulePass * llvm::createDataFlowSanitizerPass ( const std::vector< std::string > &  ABIListFiles = std::vector< std::string >(),
void *(*)()  getArgTLS = nullptr,
void *(*)()  getRetValTLS = nullptr 
)

◆ createDeadArgEliminationPass()

ModulePass * llvm::createDeadArgEliminationPass ( )

createDeadArgEliminationPass - This pass removes arguments from functions which are not used by the body of the function.

Referenced by LLVMAddDeadArgEliminationPass(), and llvm::PassManagerBuilder::populateModulePassManager().

◆ createDeadArgHackingPass()

ModulePass * llvm::createDeadArgHackingPass ( )

DeadArgHacking pass - Same as DAE, but delete arguments of external functions as well.

This is definitely not safe, and should only be used by bugpoint.

Definition at line 118 of file DeadArgumentElimination.cpp.

◆ createDeadCodeEliminationPass()

FunctionPass * llvm::createDeadCodeEliminationPass ( )

Definition at line 171 of file DCE.cpp.

◆ createDeadInstEliminationPass()

Pass * llvm::createDeadInstEliminationPass ( )

◆ createDeadStoreEliminationPass()

Dead Store false FunctionPass * llvm::createDeadStoreEliminationPass ( )

Definition at line 1395 of file DeadStoreElimination.cpp.

Referenced by LLVMAddDeadStoreEliminationPass().

◆ createDelinearizationPass()

FunctionPass * llvm::createDelinearizationPass ( )

◆ createDemandedBitsWrapperPass()

FunctionPass * llvm::createDemandedBitsWrapperPass ( )

Create a demanded bits analysis pass.

Definition at line 471 of file DemandedBits.cpp.

◆ createDemoteRegisterToMemoryPass()

FunctionPass * llvm::createDemoteRegisterToMemoryPass ( )

Definition at line 126 of file Reg2Mem.cpp.

Referenced by LLVMAddDemoteMemoryToRegisterPass().

◆ createDependenceAnalysisWrapperPass()

FunctionPass * llvm::createDependenceAnalysisWrapperPass ( )

createDependenceAnalysisPass - This creates an instance of the DependenceAnalysis wrapper pass.

Definition at line 144 of file DependenceAnalysis.cpp.

◆ createDevirtSCCRepeatedPass()

template<typename PassT >
DevirtSCCRepeatedPass< PassT > llvm::createDevirtSCCRepeatedPass ( PassT  Pass,
int  MaxIterations 
)

A function to deduce a function pass type and wrap it in the templated adaptor.

Definition at line 717 of file CGSCCPassManager.h.

References MaxIterations.

Referenced by llvm::PassBuilder::buildModuleSimplificationPipeline().

◆ createDivRemPairsPass()

div rem Hoist decompose integer division and false FunctionPass * llvm::createDivRemPairsPass ( )

◆ createDomOnlyPrinterPass()

FunctionPass * llvm::createDomOnlyPrinterPass ( )

Definition at line 271 of file DomPrinter.cpp.

◆ createDomOnlyViewerPass()

FunctionPass * llvm::createDomOnlyViewerPass ( )

Definition at line 279 of file DomPrinter.cpp.

◆ createDomPrinterPass()

FunctionPass * llvm::createDomPrinterPass ( )

◆ createDomViewerPass()

FunctionPass * llvm::createDomViewerPass ( )

Definition at line 275 of file DomPrinter.cpp.

◆ createEarlyCSEPass()

FunctionPass * llvm::createEarlyCSEPass ( bool  UseMemorySSA = false)

◆ createELFStreamer()

MCStreamer * llvm::createELFStreamer ( MCContext &  Ctx,
std::unique_ptr< MCAsmBackend > &&  TAB,
std::unique_ptr< MCObjectWriter > &&  OW,
std::unique_ptr< MCCodeEmitter > &&  CE,
bool  RelaxAll 
)

◆ createEliminateAvailableExternallyPass()

ModulePass * llvm::createEliminateAvailableExternallyPass ( )

This transform is designed to eliminate available external globals (functions or global variables)

Referenced by llvm::PassManagerBuilder::populateModulePassManager().

◆ createEntryExitInstrumenterPass()

post inline ee Instrument function entry exit with calls to e g false FunctionPass * llvm::createEntryExitInstrumenterPass ( )

◆ createExternalAAWrapperPass()

ImmutablePass * llvm::createExternalAAWrapperPass ( std::function< void(Pass &, Function &, AAResults &)>  Callback)

A wrapper pass around a callback which can be used to populate the AAResults in the AAResultsWrapperPass from an external AA.

The callback provided here will be used each time we prepare an AAResults object, and will receive a reference to the function wrapper pass, the function, and the AAResults object to populate. This should be used when setting up a custom pass pipeline to inject a hook into the AA results.

◆ createFileError() [1/5]

Error llvm::createFileError ( const Twine &  F,
Error  E 
)
inline

Concatenate a source file path and/or name with an Error.

The resulting Error is unchecked.

Definition at line 1227 of file Error.h.

Referenced by createFileError().

◆ createFileError() [2/5]

Error llvm::createFileError ( const Twine &  F,
ErrorSuccess   
)
delete

◆ createFileError() [3/5]

Error llvm::createFileError ( const Twine &  F,
size_t  Line,
Error  E 
)
inline

Concatenate a source file path and/or name with line number and an Error.

The resulting Error is unchecked.

Definition at line 1233 of file Error.h.

◆ createFileError() [4/5]

Error llvm::createFileError ( const Twine &  F,
size_t  Line,
std::error_code  EC 
)
inline

Concatenate a source file path and/or name with line number and std::error_code to form an Error object.

Definition at line 1245 of file Error.h.

References createFileError(), errorCodeToError(), and F.

◆ createFileError() [5/5]

Error llvm::createFileError ( const Twine &  F,
std::error_code  EC 
)
inline

Concatenate a source file path and/or name with a std::error_code to form an Error object.

Definition at line 1239 of file Error.h.

References createFileError(), errorCodeToError(), and F.

◆ createFlattenCFGPass()

Flatten the false FunctionPass * llvm::createFlattenCFGPass ( )

Definition at line 48 of file FlattenCFGPass.cpp.

◆ createFloat2IntPass()

FunctionPass * llvm::createFloat2IntPass ( )

Definition at line 528 of file Float2Int.cpp.

Referenced by llvm::PassManagerBuilder::populateModulePassManager().

◆ createForceFunctionAttrsLegacyPass()

Pass * llvm::createForceFunctionAttrsLegacyPass ( )

Create a legacy pass manager instance of a pass to force function attrs.

Referenced by llvm::PassManagerBuilder::populateModulePassManager().

◆ createFunctionImportPass()

Pass * llvm::createFunctionImportPass ( )

This pass performs iterative function importing from other modules.

Referenced by INITIALIZE_PASS().

◆ createFunctionInliningPass() [1/4]

Function Integration false Pass * llvm::createFunctionInliningPass ( )

createFunctionInliningPass - Return a new pass object that uses a heuristic to inline direct function calls to small functions.

The Threshold can be passed directly, or asked to be computed from the given optimization and size optimization arguments.

The -inline-threshold command line option takes precedence over the threshold given here.

Definition at line 97 of file InlineSimple.cpp.

Referenced by LLVMAddFunctionInliningPass(), LLVMPassManagerBuilderPopulateLTOPassManager(), LLVMPassManagerBuilderUseInlinerWithThreshold(), and llvm::LTOCodeGenerator::optimize().

◆ createFunctionInliningPass() [2/4]

Pass * llvm::createFunctionInliningPass ( InlineParams Params)

Definition at line 112 of file InlineSimple.cpp.

◆ createFunctionInliningPass() [3/4]

Pass * llvm::createFunctionInliningPass ( int  Threshold)

Definition at line 99 of file InlineSimple.cpp.

References getInlineParams(), and Threshold.

◆ createFunctionInliningPass() [4/4]

Pass * llvm::createFunctionInliningPass ( unsigned  OptLevel,
unsigned  SizeOptLevel,
bool  DisableInlineHotCallSite 
)

Definition at line 103 of file InlineSimple.cpp.

References getInlineParams().

◆ createFunctionToLoopPassAdaptor()

template<typename LoopPassT >
FunctionToLoopPassAdaptor< LoopPassT > llvm::createFunctionToLoopPassAdaptor ( LoopPassT  Pass,
bool  DebugLogging = false 
)

A function to deduce a loop pass type and wrap it in the templated adaptor.

Definition at line 406 of file LoopPassManager.h.

Referenced by llvm::PassBuilder::buildFunctionSimplificationPipeline(), and llvm::PassBuilder::buildModuleOptimizationPipeline().

◆ createGCOVProfilerPass()

insert gcov Insert instrumentation for GCOV false ModulePass * llvm::createGCOVProfilerPass ( const GCOVOptions Options = GCOVOptions::getDefault())

Definition at line 172 of file GCOVProfiling.cpp.

◆ createGlobalDCEPass()

ModulePass * llvm::createGlobalDCEPass ( )

createGlobalDCEPass - This transform is designed to eliminate unreachable internal globals (functions or global variables)

Referenced by LLVMAddGlobalDCEPass(), and llvm::PassManagerBuilder::populateModulePassManager().

◆ createGlobalOptimizerPass()

Global Variable false ModulePass * llvm::createGlobalOptimizerPass ( )

createGlobalOptimizerPass - This function returns a new pass that optimizes non-address taken internal globals.

Definition at line 3018 of file GlobalOpt.cpp.

Referenced by LLVMAddGlobalOptimizerPass(), and llvm::PassManagerBuilder::populateModulePassManager().

◆ createGlobalsAAWrapperPass()

globals Globals Alias true ModulePass * llvm::createGlobalsAAWrapperPass ( )

◆ createGlobalSplitPass()

ModulePass * llvm::createGlobalSplitPass ( )

This pass splits globals into pieces for the benefit of whole-program devirtualization and control-flow integrity.

Definition at line 184 of file GlobalSplit.cpp.

◆ createGraphFilename()

std::string llvm::createGraphFilename ( const Twine &  Name,
int &  FD 
)

Definition at line 79 of file GraphWriter.cpp.

References llvm::sys::fs::createTemporaryFile(), and errs().

◆ createGuardWideningPass()

guard Widen false loop guard Widen false FunctionPass * llvm::createGuardWideningPass ( )

Definition at line 940 of file GuardWidening.cpp.

◆ createGVExtractionPass()

ModulePass * llvm::createGVExtractionPass ( std::vector< GlobalValue * > &  GVs,
bool  deleteFn = false 
)

createGVExtractionPass - If deleteFn is true, this pass deletes the specified global values.

Otherwise, it deletes as much of the module as possible, except for the global values specified.

Definition at line 158 of file ExtractGV.cpp.

◆ createGVNHoistPass()

gvn Early GVN Hoisting of false FunctionPass * llvm::createGVNHoistPass ( )

Definition at line 1206 of file GVNHoist.cpp.

Referenced by LLVMAddGVNHoistLegacyPass().

◆ createGVNPass()

FunctionPass * llvm::createGVNPass ( bool  NoLoads = false)

Create a legacy GVN pass.

This also allows parameterizing whether or not loads are eliminated by the pass.

Definition at line 2625 of file GVN.cpp.

Referenced by LLVMAddGVNPass().

◆ createGVNSinkPass()

gvn Early GVN sinking of false FunctionPass * llvm::createGVNSinkPass ( )

Definition at line 929 of file GVNSink.cpp.

◆ createHotColdSplittingPass()

Hot Cold false ModulePass * llvm::createHotColdSplittingPass ( )

createHotColdSplittingPass - This pass outlines cold blocks into a separate function(s).

Definition at line 761 of file HotColdSplitting.cpp.

Referenced by llvm::PassManagerBuilder::populateModulePassManager().

◆ createHWAddressSanitizerLegacyPassPass()

HWAddressSanitizer false FunctionPass * llvm::createHWAddressSanitizerLegacyPassPass ( bool  CompileKernel = false,
bool  Recover = false 
)

Definition at line 313 of file HWAddressSanitizer.cpp.

References assert().

◆ createInductiveRangeCheckEliminationPass()

Pass * llvm::createInductiveRangeCheckEliminationPass ( )

Definition at line 1894 of file InductiveRangeCheckElimination.cpp.

◆ createIndVarSimplifyPass()

Induction Variable false Pass * llvm::createIndVarSimplifyPass ( )

Definition at line 2952 of file IndVarSimplify.cpp.

Referenced by LLVMAddIndVarSimplifyPass().

◆ createInferAddressSpacesPass()

FunctionPass * llvm::createInferAddressSpacesPass ( unsigned  AddressSpace = ~0u)

Definition at line 1037 of file InferAddressSpaces.cpp.

◆ createInferFunctionAttrsLegacyPass()

Infer set function false Pass * llvm::createInferFunctionAttrsLegacyPass ( )

Create a legacy pass manager instance of a pass to infer function attributes.

Definition at line 76 of file InferFunctionAttrs.cpp.

Referenced by llvm::PassManagerBuilder::populateModulePassManager().

◆ createInstCountPass()

FunctionPass * llvm::createInstCountPass ( )

◆ createInstrOrderFilePass()

ModulePass * llvm::createInstrOrderFilePass ( )

◆ createInstrProfilingLegacyPass()

Frontend instrumentation based coverage false ModulePass * llvm::createInstrProfilingLegacyPass ( const InstrProfOptions Options = InstrProfOptions(),
bool  IsCS = false 
)

Insert frontend instrumentation based profiling. Parameter IsCS indicates if.

Definition at line 390 of file InstrProfiling.cpp.

◆ createInstructionCombiningPass()

FunctionPass * llvm::createInstructionCombiningPass ( bool  ExpensiveCombines = true)

Definition at line 3625 of file InstructionCombining.cpp.

Referenced by LLVMAddInstructionCombiningPass().

◆ createInstructionNamerPass()

FunctionPass * llvm::createInstructionNamerPass ( )

◆ createInstSimplifyLegacyPass()

Remove redundant false FunctionPass * llvm::createInstSimplifyLegacyPass ( )

Create a legacy pass that does instruction simplification on each instruction in a function.

Definition at line 124 of file InstSimplifyPass.cpp.

Referenced by llvm::PassManagerBuilder::populateModulePassManager().

◆ createInterleaveMask()

Constant * llvm::createInterleaveMask ( IRBuilder<> &  Builder,
unsigned  VF,
unsigned  NumVecs 
)

Create an interleave shuffle mask.

This function creates a shuffle mask for interleaving NumVecs vectors of vectorization factor VF into a single wide vector. The mask is of the form:

<0, VF, VF * 2, ..., VF * (NumVecs - 1), 1, VF + 1, VF * 2 + 1, ...>

For example, the mask for VF = 4 and NumVecs = 2 is:

<0, 4, 1, 5, 2, 6, 3, 7>.

Definition at line 665 of file VectorUtils.cpp.

References llvm::ConstantVector::get(), and llvm::IRBuilderBase::getInt32().

Referenced by llvm::InnerLoopVectorizer::vectorizeInterleaveGroup().

◆ createInternalizePass() [1/2]

ModulePass * llvm::createInternalizePass ( )

createInternalizePass - Same as above, but with an empty exportList.

Referenced by LLVMAddInternalizePass().

◆ createInternalizePass() [2/2]

ModulePass * llvm::createInternalizePass ( std::function< bool(const GlobalValue &)>  MustPreserveGV)

createInternalizePass - This pass loops over all of the functions in the input module, internalizing all globals (functions and variables) it can.

Before internalizing a symbol, the callback MustPreserveGV is invoked and gives to the client the ability to prevent internalizing specific symbols.

The symbol in DSOList are internalized if it is safe to drop them from the symbol table.

Note that commandline options that are used with the above function are not used now!

Definition at line 287 of file Internalize.cpp.

◆ createIPConstantPropagationPass()

ModulePass * llvm::createIPConstantPropagationPass ( )

createIPConstantPropagationPass - This pass propagates constants from call sites into the bodies of functions.

Referenced by LLVMAddIPConstantPropagationPass().

◆ createIPSCCPPass()

Interprocedural Sparse Conditional Constant false ModulePass * llvm::createIPSCCPPass ( )

createIPSCCPPass - This pass propagates constants from call sites into the bodies of functions, and keeps track of whether basic blocks are executable in the process.

Definition at line 90 of file SCCP.cpp.

Referenced by LLVMAddIPSCCPPass(), and llvm::PassManagerBuilder::populateModulePassManager().

◆ createIVUsersPass()

iv Induction Variable true Pass * llvm::createIVUsersPass ( )

Definition at line 54 of file IVUsers.cpp.

◆ createJumpThreadingPass()

jump Jump false FunctionPass * llvm::createJumpThreadingPass ( int  Threshold = -1)

Definition at line 167 of file JumpThreading.cpp.

References Threshold.

Referenced by LLVMAddJumpThreadingPass().

◆ createLAAPass()

Pass * llvm::createLAAPass ( )

Definition at line 2439 of file LoopAccessAnalysis.cpp.

◆ createLazyValueInfoPass()

FunctionPass * llvm::createLazyValueInfoPass ( )

createLazyValueInfoPass - This creates an instance of the LazyValueInfo pass.

Definition at line 58 of file LazyValueInfo.cpp.

◆ createLCSSAPass()

Loop Closed SSA Form false Pass * llvm::createLCSSAPass ( )

Definition at line 466 of file LCSSA.cpp.

◆ createLegacyDivergenceAnalysisPass()

Legacy Divergence true FunctionPass * llvm::createLegacyDivergenceAnalysisPass ( )

Definition at line 286 of file LegacyDivergenceAnalysis.cpp.

◆ createLegacyPMAAResults()

AAResults llvm::createLegacyPMAAResults ( Pass P,
Function F,
BasicAAResult BAR 
)

A helper for the legacy pass manager to create a AAResults object populated to the best of our ability for a particular function when inside of a ModulePass or a CallGraphSCCPass.

If a ModulePass or a CallGraphSCCPass calls createLegacyPMAAResults, it also needs to call addUsedAAAnalyses in getAnalysisUsage.

Definition at line 841 of file AliasAnalysis.cpp.

References llvm::AAResults::addAAResult(), DisableBasicAA, llvm::TargetLibraryInfoWrapperPass::getTLI(), and P.

Referenced by llvm::LegacyAARGetter::operator()().

◆ createLegacyPMBasicAAResult()

BasicAAResult llvm::createLegacyPMBasicAAResult ( Pass P,
Function F 
)

A helper for the legacy pass manager to create a BasicAAResult object populated to the best of our ability for a particular function when inside of a ModulePass or a CallGraphSCCPass.

Definition at line 2072 of file BasicAliasAnalysis.cpp.

References F, llvm::AssumptionCacheTracker::getAssumptionCache(), llvm::TargetLibraryInfoWrapperPass::getTLI(), and P.

Referenced by llvm::LegacyAARGetter::operator()().

◆ createLibCallsShrinkWrapPass()

FunctionPass * llvm::createLibCallsShrinkWrapPass ( )

Definition at line 546 of file LibCallsShrinkWrap.cpp.

◆ createLICMPass() [1/2]

Loop Invariant Code false Pass * llvm::createLICMPass ( )

◆ createLICMPass() [2/2]

Pass * llvm::createLICMPass ( unsigned  LicmMssaOptCap,
unsigned  LicmMssaNoAccForPromotionCap 
)

Definition at line 314 of file LICM.cpp.

◆ createLintPass()

FunctionPass * llvm::createLintPass ( )

Create a lint pass.

Check a module or function.

Definition at line 733 of file Lint.cpp.

◆ createLoadStoreVectorizerPass()

Vectorize load and store false Pass * llvm::createLoadStoreVectorizerPass ( )

Create a legacy pass manager instance of the LoadStoreVectorizer pass.

Definition at line 245 of file LoadStoreVectorizer.cpp.

◆ createLoopDataPrefetchPass()

loop data Loop Data false FunctionPass * llvm::createLoopDataPrefetchPass ( )

Definition at line 136 of file LoopDataPrefetch.cpp.

◆ createLoopDeletionPass()

loop Delete dead false Pass * llvm::createLoopDeletionPass ( )

Definition at line 249 of file LoopDeletion.cpp.

Referenced by LLVMAddLoopDeletionPass().

◆ createLoopDistributePass()

FunctionPass * llvm::createLoopDistributePass ( )

◆ createLoopExtractorPass()

Pass * llvm::createLoopExtractorPass ( )

createLoopExtractorPass - This pass extracts all natural loops from the program into a function if it can.

◆ createLoopFusePass()

FunctionPass * llvm::createLoopFusePass ( )

◆ createLoopGuardWideningPass()

Pass * llvm::createLoopGuardWideningPass ( )

Definition at line 944 of file GuardWidening.cpp.

◆ createLoopIdiomPass()

loop Recognize loop false Pass * llvm::createLoopIdiomPass ( )

Definition at line 280 of file LoopIdiomRecognize.cpp.

Referenced by LLVMAddLoopIdiomPass().

◆ createLoopInstSimplifyPass()

loop Simplify instructions in false Pass * llvm::createLoopInstSimplifyPass ( )

Definition at line 252 of file LoopInstSimplify.cpp.

◆ createLoopInterchangePass()

loop Interchanges loops for cache false Pass * llvm::createLoopInterchangePass ( )

Definition at line 1561 of file LoopInterchange.cpp.

◆ createLoopLoadEliminationPass()

FunctionPass * llvm::createLoopLoadEliminationPass ( )

◆ createLoopPredicationPass()

loop Loop false Pass * llvm::createLoopPredicationPass ( )

Definition at line 344 of file LoopPredication.cpp.

◆ createLoopRerollPass()

Pass * llvm::createLoopRerollPass ( )

Definition at line 493 of file LoopRerollPass.cpp.

Referenced by LLVMAddLoopRerollPass().

◆ createLoopRotatePass()

loop Rotate false Pass * llvm::createLoopRotatePass ( int  MaxHeaderSize = -1)

◆ createLoopSimplifyCFGPass()

loop Simplify loop false Pass * llvm::createLoopSimplifyCFGPass ( )

Definition at line 760 of file LoopSimplifyCFG.cpp.

Referenced by LLVMAddLoopSimplifyCFGPass().

◆ createLoopSimplifyPass()

Pass * llvm::createLoopSimplifyPass ( )

Definition at line 792 of file LoopSimplify.cpp.

◆ createLoopSinkPass()

Pass * llvm::createLoopSinkPass ( )

◆ createLoopStrengthReducePass()

loop Loop Strength false Pass * llvm::createLoopStrengthReducePass ( )

Definition at line 5770 of file LoopStrengthReduce.cpp.

◆ createLoopUnrollAndJamPass()

loop unroll and Unroll and Jam false Pass * llvm::createLoopUnrollAndJamPass ( int  OptLevel = 2)

◆ createLoopUnrollPass()

Pass * llvm::createLoopUnrollPass ( int  OptLevel = 2,
bool  OnlyWhenForced = false,
bool  ForgetAllSCEV = false,
int  Threshold = -1,
int  Count = -1,
int  AllowPartial = -1,
int  Runtime = -1,
int  UpperBound = -1,
int  AllowPeeling = -1 
)

◆ createLoopUnswitchPass()

loop Unswitch false Pass * llvm::createLoopUnswitchPass ( bool  OptimizeForSize = false,
bool  hasBranchDivergence = false 
)

◆ createLoopVectorizePass() [1/2]

Pass * llvm::createLoopVectorizePass ( )

◆ createLoopVectorizePass() [2/2]

Pass * llvm::createLoopVectorizePass ( bool  InterleaveOnlyWhenForced,
bool  VectorizeOnlyWhenForced 
)

Definition at line 6122 of file LoopVectorize.cpp.

◆ createLoopVersioningLICMPass()

loop versioning Loop Versioning For false Pass * llvm::createLoopVersioningLICMPass ( )

◆ createLoopVersioningPass()

FunctionPass * llvm::createLoopVersioningPass ( )

Definition at line 323 of file LoopVersioning.cpp.

◆ createLowerAtomicPass()

Pass * llvm::createLowerAtomicPass ( )

Referenced by LLVMAddLowerAtomicPass().

◆ createLowerExpectIntrinsicPass()

FunctionPass * llvm::createLowerExpectIntrinsicPass ( )

◆ createLowerGuardIntrinsicPass()

Pass * llvm::createLowerGuardIntrinsicPass ( )

◆ createLowerInvokePass()

FunctionPass * llvm::createLowerInvokePass ( )

Definition at line 86 of file LowerInvoke.cpp.

◆ createLowerSwitchPass()

Lower SwitchInst s to false FunctionPass * llvm::createLowerSwitchPass ( )

Definition at line 142 of file LowerSwitch.cpp.

Referenced by LLVMAddLowerSwitchPass().

◆ createLowerTypeTestsPass()

ModulePass * llvm::createLowerTypeTestsPass ( ModuleSummaryIndex ExportSummary,
const ModuleSummaryIndex ImportSummary 
)

This pass lowers type metadata and the llvm.type.test intrinsic to bitsets.

The behavior depends on the summary arguments:

  • If ExportSummary is non-null, this pass will export type identifiers to the given summary.
  • Otherwise, if ImportSummary is non-null, this pass will import type identifiers from the given summary.
  • Otherwise it does neither. It is invalid for both ExportSummary and ImportSummary to be non-null.

Referenced by llvm::PassManagerBuilder::populateLTOPassManager(), and llvm::PassManagerBuilder::populateThinLTOPassManager().

◆ createLowerWidenableConditionPass()

Pass * llvm::createLowerWidenableConditionPass ( )

◆ createLVMissedAnalysis()

OptimizationRemarkAnalysis llvm::createLVMissedAnalysis ( const char PassName,
StringRef  RemarkName,
Loop TheLoop,
Instruction I = nullptr 
)

Create an analysis remark that explains why vectorization failed.

PassName is the name of the pass (e.g. can be AlwaysPrint). RemarkName is the identifier for the remark. If I is passed it is an instruction that prevents vectorization. Otherwise TheLoop is used for the location of the remark.

Returns
the remark object that can be streamed to.

Definition at line 62 of file LoopVectorizationLegality.cpp.

References llvm::LoopBase< BlockT, LoopT >::getHeader(), llvm::Loop::getStartLoc(), and I.

Referenced by llvm::LoopVectorizePass::processLoop().

◆ createMachOStreamer()

MCStreamer * llvm::createMachOStreamer ( MCContext &  Ctx,
std::unique_ptr< MCAsmBackend > &&  TAB,
std::unique_ptr< MCObjectWriter > &&  OW,
std::unique_ptr< MCCodeEmitter > &&  CE,
bool  RelaxAll,
bool  DWARFMustBeAtTheEnd,
bool  LabelSections = false 
)

◆ createMCRelocationInfo()

MCRelocationInfo * llvm::createMCRelocationInfo ( const Triple &  TT,
MCContext &  Ctx 
)

◆ createMCSymbolizer()

MCSymbolizer * llvm::createMCSymbolizer ( const Triple &  TT,
LLVMOpInfoCallback  GetOpInfo,
LLVMSymbolLookupCallback  SymbolLookUp,
void *  DisInfo,
MCContext *  Ctx,
std::unique_ptr< MCRelocationInfo > &&  RelInfo 
)

◆ createMemCpyLoopKnownSize()

void llvm::createMemCpyLoopKnownSize ( Instruction InsertBefore,
Value SrcAddr,
Value DstAddr,
ConstantInt CopyLen,
unsigned  SrcAlign,
unsigned  DestAlign,
bool  SrcIsVolatile,
bool  DstIsVolatile,
const TargetTransformInfo TTI 
)

◆ createMemCpyLoopUnknownSize()

void llvm::createMemCpyLoopUnknownSize ( Instruction InsertBefore,
Value SrcAddr,
Value DstAddr,
Value CopyLen,
unsigned  SrcAlign,
unsigned  DestAlign,
bool  SrcIsVolatile,
bool  DstIsVolatile,
const TargetTransformInfo TTI 
)

◆ createMemCpyOptPass()

FunctionPass * llvm::createMemCpyOptPass ( )

The public interface to this file...

Definition at line 371 of file MemCpyOptimizer.cpp.

Referenced by LLVMAddMemCpyOptPass().

◆ createMemDepPrinter()

print Print MemDeps of true FunctionPass * llvm::createMemDepPrinter ( )

Definition at line 84 of file MemDepPrinter.cpp.

◆ createMemDerefPrinter()

print Memory Dereferenciblity of pointers in true FunctionPass * llvm::createMemDerefPrinter ( )

Definition at line 47 of file MemDerefPrinter.cpp.

◆ createMemorySanitizerLegacyPassPass()

MemorySanitizer false FunctionPass * llvm::createMemorySanitizerLegacyPassPass ( MemorySanitizerOptions  Options = {})

Definition at line 647 of file MemorySanitizer.cpp.

◆ createMergedLoadStoreMotionPass()

FunctionPass * llvm::createMergedLoadStoreMotionPass ( )

createMergedLoadStoreMotionPass - The public interface to this file.

Definition at line 376 of file MergedLoadStoreMotion.cpp.

Referenced by LLVMAddMergedLoadStoreMotionPass().

◆ createMergeFunctionsPass()

ModulePass * llvm::createMergeFunctionsPass ( )

createMergeFunctionsPass - This pass discovers identical functions and collapses them.

Definition at line 306 of file MergeFunctions.cpp.

Referenced by llvm::PassManagerBuilder::populateModulePassManager().

◆ createMergeICmpsLegacyPass()

Merge contiguous icmps into a false Pass * llvm::createMergeICmpsLegacyPass ( )

Definition at line 930 of file MergeICmps.cpp.

◆ createMetaRenamerPass()

Assign new names to false ModulePass * llvm::createMetaRenamerPass ( )

Definition at line 175 of file MetaRenamer.cpp.

◆ createMinMaxOp()

Value * llvm::createMinMaxOp ( IRBuilder<> &  Builder,
RecurrenceDescriptor::MinMaxRecurrenceKind  RK,
Value Left,
Value Right 
)

◆ createModRefInfo()

LLVM_NODISCARD ModRefInfo llvm::createModRefInfo ( const FunctionModRefBehavior  FMRB)
inline

◆ createModuleAddressSanitizerLegacyPassPass()

ModulePass * llvm::createModuleAddressSanitizerLegacyPassPass ( bool  CompileKernel = false,
bool  Recover = false,
bool  UseGlobalsGC = true,
bool  UseOdrIndicator = true 
)

◆ createModuleDebugInfoPrinterPass()

ModulePass * llvm::createModuleDebugInfoPrinterPass ( )

◆ createModuleSummaryIndexWrapperPass()

module summary Module Summary true ModulePass * llvm::createModuleSummaryIndexWrapperPass ( )

Definition at line 850 of file ModuleSummaryAnalysis.cpp.

◆ createModuleToFunctionPassAdaptor()

template<typename FunctionPassT >
ModuleToFunctionPassAdaptor< FunctionPassT > llvm::createModuleToFunctionPassAdaptor ( FunctionPassT  Pass)

◆ createModuleToPostOrderCGSCCPassAdaptor()

template<typename CGSCCPassT >
ModuleToPostOrderCGSCCPassAdaptor< CGSCCPassT > llvm::createModuleToPostOrderCGSCCPassAdaptor ( CGSCCPassT  Pass)

A function to deduce a function pass type and wrap it in the templated adaptor.

Definition at line 366 of file CGSCCPassManager.h.

Referenced by llvm::PassBuilder::buildLTODefaultPipeline(), and llvm::PassBuilder::buildModuleSimplificationPipeline().

◆ createMustExecutePrinter()

print Instructions which execute on loop true FunctionPass * llvm::createMustExecutePrinter ( )

Definition at line 319 of file MustExecute.cpp.

◆ createNameAnonGlobalPass()

ModulePass * llvm::createNameAnonGlobalPass ( )

===------------------------------------------------------------------—===//

Definition at line 117 of file NameAnonGlobals.cpp.

Referenced by llvm::PassManagerBuilder::populateModulePassManager().

◆ createNaryReassociatePass()

nary Nary false FunctionPass * llvm::createNaryReassociatePass ( )

Definition at line 162 of file NaryReassociate.cpp.

◆ createNewGVNPass()

Global Value false FunctionPass * llvm::createNewGVNPass ( )

Definition at line 4220 of file NewGVN.cpp.

Referenced by LLVMAddNewGVNPass().

◆ createNullStreamer()

MCStreamer * llvm::createNullStreamer ( MCContext &  Ctx)

◆ createObjCARCAAWrapperPass()

ImmutablePass * llvm::createObjCARCAAWrapperPass ( )

◆ createObjCARCAPElimPass()

Pass * llvm::createObjCARCAPElimPass ( )

◆ createObjCARCContractPass()

Pass * llvm::createObjCARCContractPass ( )

Definition at line 767 of file ObjCARCContract.cpp.

Referenced by llvm::LTOCodeGenerator::compileOptimized().

◆ createObjCARCExpandPass()

Pass * llvm::createObjCARCExpandPass ( )

◆ createPAEvalPass()

FunctionPass * llvm::createPAEvalPass ( )

Definition at line 87 of file ProvenanceAnalysisEvaluator.cpp.

◆ createPartialInliningPass()

partial Partial false ModulePass * llvm::createPartialInliningPass ( )

createPartialInliningPass - This pass inlines parts of functions.

Definition at line 1493 of file PartialInlining.cpp.

Referenced by llvm::PassManagerBuilder::populateModulePassManager().

◆ createPartiallyInlineLibCallsPass()

partially inline Partially calls to library false FunctionPass * llvm::createPartiallyInlineLibCallsPass ( )

Definition at line 183 of file PartiallyInlineLibCalls.cpp.

Referenced by LLVMAddPartiallyInlineLibCallsPass().

◆ createPGOIndirectCallPromotionLegacyPass()

pgo icall Use PGO instrumentation profile to promote indirect calls to direct false ModulePass * llvm::createPGOIndirectCallPromotionLegacyPass ( bool  InLTO = false,
bool  SamplePGO = false 
)

◆ createPGOInstrumentationGenCreateVarLegacyPass()

ModulePass * llvm::createPGOInstrumentationGenCreateVarLegacyPass ( StringRef  CSInstrName = StringRef(""))

◆ createPGOInstrumentationGenLegacyPass()

pgo instr PGO false ModulePass * llvm::createPGOInstrumentationGenLegacyPass ( bool  IsCS = false)

Definition at line 478 of file PGOInstrumentation.cpp.

◆ createPGOInstrumentationUseLegacyPass()

pgo instr Read PGO instrumentation false ModulePass * llvm::createPGOInstrumentationUseLegacyPass ( StringRef  Filename = StringRef(""),
bool  IsCS = false 
)

Definition at line 492 of file PGOInstrumentation.cpp.

◆ createPGOMemOPSizeOptLegacyPass()

FunctionPass * llvm::createPGOMemOPSizeOptLegacyPass ( )

◆ createPlaceSafepointsPass()

FunctionPass * llvm::createPlaceSafepointsPass ( )

Definition at line 600 of file PlaceSafepoints.cpp.

◆ createPostDomOnlyPrinterPass()

FunctionPass * llvm::createPostDomOnlyPrinterPass ( )

Definition at line 287 of file DomPrinter.cpp.

◆ createPostDomOnlyViewerPass()

FunctionPass * llvm::createPostDomOnlyViewerPass ( )

Definition at line 295 of file DomPrinter.cpp.

◆ createPostDomPrinterPass()

FunctionPass * llvm::createPostDomPrinterPass ( )

Definition at line 283 of file DomPrinter.cpp.

◆ createPostDomTree()

FunctionPass * llvm::createPostDomTree ( )

Definition at line 63 of file PostDominators.cpp.

◆ createPostDomViewerPass()

FunctionPass * llvm::createPostDomViewerPass ( )

Definition at line 291 of file DomPrinter.cpp.

◆ createPostInlineEntryExitInstrumenterPass()

FunctionPass * llvm::createPostInlineEntryExitInstrumenterPass ( )

Definition at line 161 of file EntryExitInstrumenter.cpp.

◆ createPostOrderFunctionAttrsLegacyPass()

Deduce function false Pass * llvm::createPostOrderFunctionAttrsLegacyPass ( )

Create a legacy pass manager instance of a pass to compute function attrs in post-order.

Definition at line 1479 of file FunctionAttrs.cpp.

Referenced by LLVMAddFunctionAttrsPass(), and llvm::PassManagerBuilder::populateModulePassManager().

◆ createPrintBasicBlockPass()

BasicBlockPass * llvm::createPrintBasicBlockPass ( llvm::raw_ostream OS,
const std::string &  Banner = "" 
)

Create and return a pass that writes the BB to the specified raw_ostream.

Definition at line 149 of file IRPrintingPasses.cpp.

◆ createPrintFunctionPass()

FunctionPass * llvm::createPrintFunctionPass ( llvm::raw_ostream OS,
const std::string &  Banner = "" 
)

Create and return a pass that prints functions to the specified raw_ostream as they are processed.

Definition at line 144 of file IRPrintingPasses.cpp.

Referenced by llvm::legacy::FunctionPassManagerImpl::createPrinterPass().

◆ createPrintModulePass()

ModulePass * llvm::createPrintModulePass ( raw_ostream OS,
const std::string &  Banner = "",
bool  ShouldPreserveUseListOrder = false 
)

Create and return a pass that writes the module to the specified raw_ostream.

Referenced by llvm::legacy::PassManagerImpl::createPrinterPass().

◆ createPrivateGlobalForString()

GlobalVariable * llvm::createPrivateGlobalForString ( Module M,
StringRef  Str,
bool  AllowMerging,
const char NamePrefix = "" 
)

◆ createPromoteMemoryToRegisterPass()

Promote Memory to false FunctionPass * llvm::createPromoteMemoryToRegisterPass ( )

◆ createPruneEHPass()

prune Remove unused exception handling info false false Pass * llvm::createPruneEHPass ( )

createPruneEHPass - Return a new pass object which transforms invoke instructions into calls, if the callee can not unwind the stack.

Definition at line 60 of file PruneEH.cpp.

Referenced by LLVMAddPruneEHPass(), and llvm::PassManagerBuilder::populateModulePassManager().

◆ createReassociatePass()

FunctionPass * llvm::createReassociatePass ( )

Referenced by LLVMAddReassociatePass().

◆ createRegionInfoPass()

FunctionPass * llvm::createRegionInfoPass ( )

Definition at line 177 of file RegionInfo.cpp.

◆ createRegionOnlyPrinterPass()

FunctionPass * llvm::createRegionOnlyPrinterPass ( )

Definition at line 217 of file RegionPrinter.cpp.

◆ createRegionOnlyViewerPass()

FunctionPass * llvm::createRegionOnlyViewerPass ( )

Definition at line 225 of file RegionPrinter.cpp.

Referenced by viewRegionOnly().

◆ createRegionPrinterPass()

dot regions Print regions of function to dot true view regions View regions of true FunctionPass * llvm::createRegionPrinterPass ( )

Definition at line 215 of file RegionPrinter.cpp.

◆ createRegionViewerPass()

FunctionPass * llvm::createRegionViewerPass ( )

Definition at line 221 of file RegionPrinter.cpp.

Referenced by viewRegion().

◆ createRepeatedPass()

template<typename PassT >
RepeatedPass< PassT > llvm::createRepeatedPass ( int  Count,
PassT  P 
)

Definition at line 1443 of file PassManager.h.

References P.

◆ createReplicatedMask()

Constant * llvm::createReplicatedMask ( IRBuilder<> &  Builder,
unsigned  ReplicationFactor,
unsigned  VF 
)

Create a mask with replicated elements.

This function creates a shuffle mask for replicating each of the VF elements in a vector ReplicationFactor times. It can be used to transform a mask of VF elements into a mask of VF * ReplicationFactor elements used by a predicated interleaved-group of loads/stores whose Interleaved-factor == ReplicationFactor.

For example, the mask for ReplicationFactor=3 and VF=4 is:

<0,0,0,1,1,1,2,2,2,3,3,3>

Definition at line 655 of file VectorUtils.cpp.

References llvm::ConstantVector::get(), and llvm::IRBuilderBase::getInt32().

Referenced by llvm::InnerLoopVectorizer::vectorizeInterleaveGroup().

◆ createReversePostOrderFunctionAttrsPass()

rpo Deduce function attributes in false Pass * llvm::createReversePostOrderFunctionAttrsPass ( )

createReversePostOrderFunctionAttrsPass - This pass walks SCCs of the call graph in RPO to deduce and propagate function attributes.

Currently it only handles synthesizing norecurse attributes.

Definition at line 1543 of file FunctionAttrs.cpp.

Referenced by llvm::PassManagerBuilder::populateModulePassManager().

◆ createRewriteStatepointsForGCLegacyPass()

ModulePass * llvm::createRewriteStatepointsForGCLegacyPass ( )

Definition at line 217 of file RewriteStatepointsForGC.cpp.

◆ createRewriteSymbolsPass() [1/2]

ModulePass * llvm::createRewriteSymbolsPass ( )

◆ createRewriteSymbolsPass() [2/2]

ModulePass * llvm::createRewriteSymbolsPass ( SymbolRewriter::RewriteDescriptorList DL)

Definition at line 582 of file SymbolRewriter.cpp.

◆ createSafepointIRVerifierPass()

FunctionPass * llvm::createSafepointIRVerifierPass ( )

Create an instance of the safepoint verifier pass which can be added to a pass pipeline to check for relocation bugs.

Definition at line 243 of file SafepointIRVerifier.cpp.

◆ createSampleProfileLoaderPass() [1/2]

ModulePass * llvm::createSampleProfileLoaderPass ( )

◆ createSampleProfileLoaderPass() [2/2]

ModulePass * llvm::createSampleProfileLoaderPass ( StringRef  Name)

Definition at line 1591 of file SampleProfile.cpp.

◆ createSanitizerCoverageModulePass()

SanitizerCoverage false ModulePass * llvm::createSanitizerCoverageModulePass ( const SanitizerCoverageOptions Options = SanitizerCoverageOptions())

Definition at line 900 of file SanitizerCoverage.cpp.

◆ createSanitizerCtorAndInitFunctions()

std::pair< Function *, FunctionCallee > llvm::createSanitizerCtorAndInitFunctions ( Module M,
StringRef  CtorName,
StringRef  InitName,
ArrayRef< Type * >  InitArgTypes,
ArrayRef< Value * >  InitArgs,
StringRef  VersionCheckName = StringRef() 
)

Creates sanitizer constructor function, and calls sanitizer's init function from it.

Returns
Returns pair of pointers to constructor, and init functions respectively.

Definition at line 119 of file ModuleUtils.cpp.

References assert(), llvm::Function::Create(), llvm::ReturnInst::Create(), llvm::BasicBlock::Create(), llvm::IRBuilder< T, Inserter >::CreateCall(), declareSanitizerInitFunction(), llvm::FunctionType::get(), llvm::IRBuilderBase::getVoidTy(), and llvm::GlobalValue::InternalLinkage.

Referenced by getOrCreateSanitizerCtorAndInitFunctions().

◆ createScalarizerPass()

FunctionPass * llvm::createScalarizerPass ( )

Create a legacy pass manager instance of the Scalarizer pass.

Definition at line 310 of file Scalarizer.cpp.

Referenced by LLVMAddScalarizerPass().

◆ createSCCPPass()

Sparse Conditional Constant false FunctionPass * llvm::createSCCPPass ( )

Definition at line 1910 of file SCCP.cpp.

Referenced by LLVMAddSCCPPass(), and postSplitCleanup().

◆ createSCEVAAWrapperPass()

scev ScalarEvolution based Alias true FunctionPass * llvm::createSCEVAAWrapperPass ( )

Creates an instance of SCEVAAWrapperPass.

Definition at line 130 of file ScalarEvolutionAliasAnalysis.cpp.

◆ createScopedNoAliasAAWrapperPass()

ImmutablePass * llvm::createScopedNoAliasAAWrapperPass ( )

◆ createSeparateConstOffsetFromGEPPass()

separate const offset from Split GEPs to a variadic base and a constant offset for better false FunctionPass * llvm::createSeparateConstOffsetFromGEPPass ( bool  LowerGEP = false)

Definition at line 479 of file SeparateConstOffsetFromGEP.cpp.

◆ createSequentialMask()

Constant * llvm::createSequentialMask ( IRBuilder<> &  Builder,
unsigned  Start,
unsigned  NumInts,
unsigned  NumUndefs 
)

Create a sequential shuffle mask.

This function creates shuffle mask whose elements are sequential and begin at Start. The mask contains NumInts integers and is padded with NumUndefs undef values. The mask is of the form:

<Start, Start + 1, ... Start + NumInts - 1, undef_1, ... undef_NumUndefs>

For example, the mask for Start = 0, NumInsts = 4, and NumUndefs = 4 is:

<0, 1, 2, 3, undef, undef, undef, undef>

Definition at line 684 of file VectorUtils.cpp.

References llvm::ConstantVector::get(), llvm::UndefValue::get(), llvm::IRBuilderBase::getInt32(), and llvm::IRBuilderBase::getInt32Ty().

Referenced by concatenateTwoVectors().

◆ createSimpleLoopUnrollPass()

Pass * llvm::createSimpleLoopUnrollPass ( int  OptLevel = 2,
bool  OnlyWhenForced = false,
bool  ForgetAllSCEV = false 
)

Definition at line 1255 of file LoopUnrollPass.cpp.

References createLoopUnrollPass().

◆ createSimpleLoopUnswitchLegacyPass()

simple loop Simple unswitch false Pass * llvm::createSimpleLoopUnswitchLegacyPass ( bool  NonTrivial = false)

Create the legacy pass object for the simple loop unswitcher.

See the documentaion for SimpleLoopUnswitchPass for details.

Definition at line 2987 of file SimpleLoopUnswitch.cpp.

◆ createSimpleTargetReduction()

Value * llvm::createSimpleTargetReduction ( IRBuilder<> &  B,
const TargetTransformInfo TTI,
unsigned  Opcode,
Value Src,
TargetTransformInfo::ReductionFlags  Flags = TargetTransformInfo::ReductionFlags(),
ArrayRef< Value * >  RedOps = None 
)

Create a target reduction of the given vector.

Create a simple vector reduction specified by an opcode and some flags (if generating min/max reductions).

The reduction operation is described by the Opcode parameter. min/max reductions require additional information supplied in Flags. The target is queried to determine if intrinsics or shuffle sequences are required to implement the reduction. Fast-math-flags are propagated using the IRBuilder's setting.

Definition at line 806 of file LoopUtils.cpp.

References assert(), llvm::IRBuilderBase::CreateAddReduce(), llvm::IRBuilderBase::CreateAndReduce(), llvm::IRBuilderBase::CreateFAddReduce(), llvm::IRBuilderBase::CreateFMulReduce(), llvm::IRBuilderBase::CreateFPMaxReduce(), llvm::IRBuilderBase::CreateFPMinReduce(), llvm::IRBuilderBase::CreateIntMaxReduce(), llvm::IRBuilderBase::CreateIntMinReduce(), llvm::IRBuilderBase::CreateMulReduce(), llvm::IRBuilderBase::CreateOrReduce(), llvm::IRBuilderBase::CreateXorReduce(), llvm::ConstantFP::get(), llvm::Constant::getNullValue(), getShuffleReduction(), llvm::Value::getType(), llvm::Type::getVectorElementType(), llvm::TargetTransformInfo::ReductionFlags::IsMaxOp, llvm::TargetTransformInfo::ReductionFlags::IsSigned, llvm_unreachable, llvm::TargetTransformInfo::ReductionFlags::NoNaN, and llvm::TargetTransformInfo::useReductionIntrinsic().

Referenced by createTargetReduction().

◆ createSingleLoopExtractorPass()

Pass * llvm::createSingleLoopExtractorPass ( )

createSingleLoopExtractorPass - This pass extracts one natural loop from the program into a function if it can.

This is used by bugpoint.

Definition at line 163 of file LoopExtractor.cpp.

◆ createSinkingPass()

FunctionPass * llvm::createSinkingPass ( )

Definition at line 303 of file Sink.cpp.

◆ createSLPVectorizerPass()

Pass * llvm::createSLPVectorizerPass ( )

◆ createSpeculativeExecutionIfHasBranchDivergencePass()

FunctionPass * llvm::createSpeculativeExecutionIfHasBranchDivergencePass ( )

Definition at line 300 of file SpeculativeExecution.cpp.

◆ createSpeculativeExecutionPass()

FunctionPass * llvm::createSpeculativeExecutionPass ( )

Definition at line 296 of file SpeculativeExecution.cpp.

◆ createSROAPass()

FunctionPass * llvm::createSROAPass ( )

◆ createStraightLineStrengthReducePass()

Straight line strength false FunctionPass * llvm::createStraightLineStrengthReducePass ( )

Definition at line 255 of file StraightLineStrengthReduce.cpp.

◆ createStrideMask()

Constant * llvm::createStrideMask ( IRBuilder<> &  Builder,
unsigned  Start,
unsigned  Stride,
unsigned  VF 
)

Create a stride shuffle mask.

This function creates a shuffle mask whose elements begin at Start and are incremented by Stride. The mask can be used to deinterleave an interleaved vector into separate vectors of vectorization factor VF. The mask is of the form:

<Start, Start + Stride, ..., Start + Stride * (VF - 1)>

For example, the mask for Start = 0, Stride = 2, and VF = 4 is:

<0, 2, 4, 6>

Definition at line 675 of file VectorUtils.cpp.

References llvm::ConstantVector::get(), and llvm::IRBuilderBase::getInt32().

Referenced by llvm::InnerLoopVectorizer::vectorizeInterleaveGroup().

◆ createStringError() [1/3]

template<typename... Ts>
Error llvm::createStringError ( std::errc  EC,
char const *  Fmt,
const Ts &...  Vals 
)
inline

Definition at line 1174 of file Error.h.

References createStringError().

◆ createStringError() [2/3]

template<typename... Ts>
Error llvm::createStringError ( std::error_code  EC,
char const *  Fmt,
const Ts &...  Vals 
)
inline

◆ createStringError() [3/3]

Error llvm::createStringError ( std::error_code  EC,
char const *  Msg 
)

Definition at line 135 of file Error.cpp.

◆ createStripDeadDebugInfoPass()

ModulePass * llvm::createStripDeadDebugInfoPass ( )

◆ createStripDeadPrototypesPass()

ModulePass * llvm::createStripDeadPrototypesPass ( )

createStripDeadPrototypesPass - This pass removes any function declarations (prototypes) that are not used.

Referenced by LLVMAddStripDeadPrototypesPass(), and llvm::PassManagerBuilder::populateModulePassManager().

◆ createStripDebugDeclarePass()

ModulePass * llvm::createStripDebugDeclarePass ( )

◆ createStripNonDebugSymbolsPass()

ModulePass * llvm::createStripNonDebugSymbolsPass ( )

◆ createStripNonLineTableDebugInfoPass()

ModulePass * llvm::createStripNonLineTableDebugInfoPass ( )

This function returns a new pass that downgrades the debug info in the module to line tables only.

◆ createStripSymbolsPass()

ModulePass * llvm::createStripSymbolsPass ( bool  OnlyDebugInfo = false)

Referenced by LLVMAddStripSymbolsPass().

◆ createStructurizeCFGPass()

Pass * llvm::createStructurizeCFGPass ( bool  SkipUniformRegions = false)

When SkipUniformRegions is true the structizer will not structurize regions that only contain uniform branches.

Definition at line 1061 of file StructurizeCFG.cpp.

◆ createTailCallEliminationPass()

Tail Call false FunctionPass * llvm::createTailCallEliminationPass ( )

Definition at line 857 of file TailRecursionElimination.cpp.

Referenced by LLVMAddTailCallEliminationPass().

◆ createTargetReduction()

Value * llvm::createTargetReduction ( IRBuilder<> &  B,
const TargetTransformInfo TTI,
RecurrenceDescriptor Desc,
Value Src,
bool  NoNaN = false 
)

Create a generic target reduction using a recurrence descriptor Desc The target is queried to determine if intrinsics or shuffle sequences are required to implement the reduction.

Create a vector reduction using a given recurrence descriptor.

Fast-math-flags are propagated using the RecurrenceDescriptor.

Definition at line 878 of file LoopUtils.cpp.

References createSimpleTargetReduction(), llvm::RecurrenceDescriptor::getFastMathFlags(), llvm::RecurrenceDescriptor::getMinMaxRecurrenceKind(), llvm::RecurrenceDescriptor::getRecurrenceKind(), llvm::TargetTransformInfo::ReductionFlags::IsMaxOp, llvm::TargetTransformInfo::ReductionFlags::IsSigned, llvm_unreachable, llvm::TargetTransformInfo::ReductionFlags::NoNaN, and llvm::IRBuilderBase::setFastMathFlags().

Referenced by llvm::InnerLoopVectorizer::fixReduction().

◆ createTargetTransformInfoWrapperPass()

ImmutablePass * llvm::createTargetTransformInfoWrapperPass ( TargetIRAnalysis  TIRA)

Create an analysis pass wrapper around a TTI object.

This analysis pass just holds the TTI instance and makes it available to clients.

Definition at line 1376 of file TargetTransformInfo.cpp.

Referenced by llvm::LTOCodeGenerator::optimize().

◆ createThreadSanitizerLegacyPassPass()

FunctionPass * llvm::createThreadSanitizerLegacyPassPass ( )

Definition at line 182 of file ThreadSanitizer.cpp.

◆ createTypeBasedAAWrapperPass()

ImmutablePass * llvm::createTypeBasedAAWrapperPass ( )

◆ createUnifyFunctionExitNodesPass()

Pass * llvm::createUnifyFunctionExitNodesPass ( )

◆ createVerifierPass()

FunctionPass * llvm::createVerifierPass ( bool  FatalErrors = true)

◆ createWarnMissedTransformationsPass()

transform Warn about non applied false Pass * llvm::createWarnMissedTransformationsPass ( )

◆ createWasmStreamer()

MCStreamer * llvm::createWasmStreamer ( MCContext &  Ctx,
std::unique_ptr< MCAsmBackend > &&  TAB,
std::unique_ptr< MCObjectWriter > &&  OW,
std::unique_ptr< MCCodeEmitter > &&  CE,
bool  RelaxAll 
)

◆ createWholeProgramDevirtPass()

ModulePass * llvm::createWholeProgramDevirtPass ( ModuleSummaryIndex ExportSummary,
const ModuleSummaryIndex ImportSummary 
)

This pass implements whole-program devirtualization using type metadata.

The behavior depends on the summary arguments:

  • If ExportSummary is non-null, this pass will export type identifiers to the given summary.
  • Otherwise, if ImportSummary is non-null, this pass will import type identifiers from the given summary.
  • Otherwise it does neither. It is invalid for both ExportSummary and ImportSummary to be non-null.

Definition at line 611 of file WholeProgramDevirt.cpp.

Referenced by llvm::PassManagerBuilder::populateLTOPassManager(), and llvm::PassManagerBuilder::populateThinLTOPassManager().

◆ createWriteThinLTOBitcodePass()

write thinlto Write ThinLTO true ModulePass * llvm::createWriteThinLTOBitcodePass ( raw_ostream Str,
raw_ostream ThinLinkOS = nullptr 
)

Write ThinLTO-ready bitcode to Str.

Definition at line 524 of file ThinLTOBitcodeWriter.cpp.

◆ createXCOFFStreamer()

MCStreamer * llvm::createXCOFFStreamer ( MCContext &  Ctx,
std::unique_ptr< MCAsmBackend > &&  TAB,
std::unique_ptr< MCObjectWriter > &&  OW,
std::unique_ptr< MCCodeEmitter > &&  CE,
bool  RelaxAll 
)

◆ CreateZ3Solver()

llvm::SMTSolverRef llvm::CreateZ3Solver ( )

Convenience method to create and Z3Solver object.

Definition at line 887 of file Z3Solver.cpp.

References report_fatal_error().

◆ dbgs()

raw_ostream & llvm::dbgs ( )

dbgs() - This returns a reference to a raw_ostream for debugging messages.

dbgs - Return a circular-buffered debug stream.

If debugging is disabled it returns errs(). Use it like: dbgs() << "foo" << "bar";

Definition at line 132 of file Debug.cpp.

References llvm::sys::AddSignalHandler(), debug_user_sig_handler(), DebugBufferSize, DebugFlag, EnableDebugBuffering, and errs().

Referenced by llvm::InstCombineWorklist::Add(), llvm::SSAUpdaterBulk::AddAvailableValue(), addDiscriminators(), addEdge(), addForcedAttributes(), llvm::InstCombineWorklist::AddInitialGroup(), llvm::PMDataManager::addLowerLevelRequiredPass(), addNonNullAttrs(), AddReachableCodeToWorklist(), llvm::BlockFrequencyInfoImplBase::addToDist(), llvm::SSAUpdaterBulk::AddUse(), llvm::IVUsers::AddUsersImpl(), llvm::SSAUpdaterBulk::AddVariable(), llvm::BlockFrequencyInfoImplBase::adjustLoopHeaderMass(), llvm::LoopVectorizeHints::allowVectorization(), llvm::InterleavedAccessInfo::analyzeInterleaving(), analyzeLoopUnrollCost(), analyzeParsePointLiveness(), annotateAllFunctions(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::ApplyNextUpdate(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::ApplyUpdates(), llvm::MemoryDepChecker::areDepsSafe(), assertBranchOrSelectConditionHoisted(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::attachNewSubtree(), bitTrackingDCE(), BreakUpSubtract(), llvm::CFGMST< Edge, BBInfo >::buildEdges(), buildExtractionBlockSet(), llvm::VPlanSlp::buildGraph(), llvm::VPlanHCFGBuilder::buildHierarchicalCFG(), llvm::slpvectorizer::BoUpSLP::buildTree(), llvm::BlockFrequencyInfo::calculate(), llvm::BranchProbabilityInfo::calculate(), llvm::BlockFrequencyInfoImpl< BT >::calculate(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::CalculateFromScratch(), llvm::LoopVectorizationCostModel::calculateRegisterUsage(), calculateUnswitchCostMultiplier(), llvm::DomTreeBuilder::CalculateWithUpdates(), canCreateThunkFor(), llvm::LoopVectorizationLegality::canFoldTailByMasking(), CanPropagatePredecessorsForPHIs(), canSafelyUnrollMultiExitLoop(), llvm::LoopVectorizationLegality::canVectorize(), llvm::Evaluator::castCallResultIfNeeded(), checkBiasedBranch(), checkBiasedSelect(), checkDependencies(), llvm::Attributor::checkForAllCallSites(), checkHoistValue(), llvm::AnalysisManager< IRUnitT, ExtraArgTs >::clear(), llvm::objcarc::PtrState::ClearKnownPositiveRefCount(), llvm::FunctionComparator::cmpConstants(), collectBitParts(), llvm::ScalarEvolution::collectParametricTerms(), colorEHFunclets(), combineInstructionsOverFunction(), completeEphemeralValues(), llvm::ObjectSizeOffsetVisitor::compute(), llvm::ScalarEvolution::computeAccessFunctions(), ComputeCrossModuleImport(), ComputeCrossModuleImportForModule(), computeDeadSymbols(), computeImportForFunction(), ComputeImportForModule(), computeImportForReferencedGlobals(), llvm::DivergencePropagator::computeJoinPoints(), llvm::BlockFrequencyInfoImplBase::computeLoopScale(), llvm::LoopVectorizationCostModel::computeMaxVF(), computePeelCount(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::ComputeUnreachableDominators(), computeUnrollAndJamCount(), computeUnrollCount(), ConvertDebugDeclareToDebugValue(), convertFloatingToInteger(), convertToDeclaration(), createIrreducibleLoop(), debug_user_sig_handler(), debugAssign(), debugVectorizationFailure(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::DeleteEdge(), deleteIfDead(), deleteLoopIfDead(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::DeleteReachable(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::DeleteUnreachable(), llvm::ScalarEvolution::delinearize(), llvm::DependenceInfo::depends(), llvm::Constant::destroyConstant(), llvm::BlockFrequencyInfoImplBase::distributeMass(), llvm::LoopVectorizationRequirements::doesNotMeet(), doPromotion(), llvm::AliasSet::dump(), llvm::AliasSetTracker::dump(), llvm::bfi_detail::BlockMass::dump(), llvm::BlockFrequencyInfoImplBase::dump(), llvm::CallGraph::dump(), llvm::CallGraphNode::dump(), llvm::CallGraphWrapperPass::dump(), llvm::DominanceFrontierBase< BlockT, IsPostDom >::dump(), llvm::DominanceFrontierWrapperPass::dump(), llvm::DomTreeUpdater::dump(), llvm::IVUsers::dump(), llvm::Loop::dump(), llvm::MemoryAccess::dump(), llvm::MemorySSA::dump(), llvm::PHITransAddr::dump(), llvm::RegionInfoBase< Tr >::dump(), llvm::SCEV::dump(), llvm::Trace::dump(), llvm::AttributeSet::dump(), llvm::AttributeList::dump(), llvm::GraphDiff< NodePtr, InverseGraph >::dump(), llvm::Comdat::dump(), llvm::ConstantRange::dump(), llvm::DebugLoc::dump(), llvm::PMStack::dump(), llvm::NamedMDNode::dump(), llvm::Module::dump(), llvm::ModuleSummaryIndex::dump(), llvm::Type::dump(), llvm::Value::dump(), llvm::opt::Arg::dump(), llvm::opt::ArgList::dump(), llvm::opt::Option::dump(), llvm::BranchProbability::dump(), llvm::cfg::Update< NodePtr >::dump(), llvm::DebugCounter::dump(), llvm::AbstractAttribute::dump(), llvm::GVNExpression::Expression::dump(), llvm::PredicateInfo::dump(), llvm::ConstantUniqueMap< ConstantClass >::dump(), FusionCandidate::dump(), llvm::slpvectorizer::BoUpSLP::EdgeInfo::dump(), llvm::slpvectorizer::BoUpSLP::VLOperands::dump(), llvm::ImportedFunctionsInliningStatistics::dump(), llvm::Metadata::dump(), dump(), llvm::ScaledNumberBase::dump(), llvm::PMTopLevelManager::dumpArguments(), llvm::vfs::RedirectingFileSystem::dumpEntry(), dumpImportListForModule(), dumpIR(), llvm::PMDataManager::dumpLastUses(), llvm::slpvectorizer::BoUpSLP::VLOperands::dumpMode(), llvm::PMDataManager::dumpPassArguments(), llvm::PMDataManager::dumpPassInfo(), llvm::FPPassManager::dumpPassStructure(), dumpScopes(), dumpSmallBitVector(), llvm::Loop::dumpVerbose(), llvm::JumpThreadingPass::DuplicateCondBranchOnPHIIntoPred(), eliminateDeadStores(), eliminateDeadSwitchCases(), eliminateNoopStore(), llvm::InstCombiner::eraseInstFromFunction(), llvm::Evaluator::EvaluateBlock(), llvm::Evaluator::EvaluateFunction(), EvaluateStaticConstructor(), llvm::VPBasicBlock::execute(), llvm::VPRegionBlock::execute(), expandBounds(), extractInteger(), extractVector(), fdbgs(), llvm::CodeExtractor::findAllocas(), llvm::ScalarEvolution::findArrayDimensions(), llvm::SSAUpdaterImpl< UpdaterT >::FindAvailableVals(), findBaseDefiningValueCached(), findBasePointer(), findGCD(), findIrreducibleHeaders(), findPartitions(), findProfitablePHIs(), findReturnsToZap(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::FindRoots(), FoldBranchToCommonDest(), foldReturnAndProcessPred(), llvm::InstCombiner::FoldShiftByConstant(), FoldTwoEntryPHINode(), formDedicatedExitBlocks(), LoopFuser::fuseLoops(), generateLoopLatchCheck(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::ChildrenGetter< Inverse >::Get(), getBoundsCheckCond(), llvm::Evaluator::getFormalParams(), getInlineCost(), llvm::VNCoercion::getLoadValueForLoad(), getNewAlignment(), getNewAlignmentDiff(), getNotRelocatableInstructions(), getOutliningPenalty(), getPtrStride(), GetQuadraticEquation(), llvm::slpvectorizer::BoUpSLP::getSpillCost(), llvm::DependenceInfo::getSplitIteration(), llvm::slpvectorizer::BoUpSLP::getTreeCost(), llvm::SSAUpdater::GetValueInMiddleOfBlock(), handleEndBlock(), handleFree(), llvm::objcarc::BottomUpPtrState::HandlePotentialAlterRefCount(), llvm::objcarc::TopDownPtrState::HandlePotentialAlterRefCount(), llvm::objcarc::BottomUpPtrState::HandlePotentialUse(), llvm::objcarc::TopDownPtrState::HandlePotentialUse(), llvm::VPRecipeBuilder::handleReplication(), hasOnlyUniformBranches(), hasOutsideLoopUser(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::HasProperSupport(), hoist(), hoistRegion(), hoistValue(), llvm::FunctionImporter::importFunctions(), incorporateNewSCCRange(), inferAttrsFromFunctionBodies(), llvm::objcarc::BottomUpPtrState::InitBottomUp(), inlineCallsImpl(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::InsertEdge(), insertInteger(), InsertPreheaderForLoop(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::InsertReachable(), insertTrivialPHIs(), insertUniqueBackedgeBlock(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::InsertUnreachable(), insertVector(), instrumentOneFunc(), llvm::InternalizePass::internalizeModule(), llvm::AnalysisManager< IRUnitT, ExtraArgTs >::invalidate(), llvm::InterleavedAccessInfo::invalidateGroupsRequiringScalarEpilogue(), isExplicitVecOuterLoop(), llvm::InductionDescriptor::isInductionPHI(), llvm::ScalarEvolution::isLoopBackedgeGuardedByCond(), llvm::ScalarEvolution::isLoopEntryGuardedByCond(), isOverwrite(), isProfitableChain(), llvm::RecurrenceDescriptor::isReductionPHI(), isSafeAndProfitableToSpeculateAroundPHI(), isSafeDecreasingBound(), isSafeIncreasingBound(), isSafeToPromoteArgument(), isSafeToSpeculatePHIUsers(), isSafeToUnrollAndJam(), isUniformLoop(), iterativelySinkInstructions(), KnuthDiv(), llvm::LazyCallGraph::LazyCallGraph(), LinearizeExprTree(), llvm_unreachable_internal(), loadFile(), llvm::LoopVectorizeHints::LoopVectorizeHints(), llvm::SparseSolver< LatticeKey, LatticeVal, KeyInfo >::MarkBlockExecutable(), markTails(), llvm::gvn::AvailableValue::MaterializeAdjustedValue(), MergeBlockIntoPredecessor(), mergeConstants(), mergeInlinedArrayAllocas(), moveSpillUsesAfterCoroBegin(), moveUp(), operator<<(), OptimizeAwayTrappingUsesOfLoads(), llvm::slpvectorizer::BoUpSLP::optimizeGatherSequence(), optimizeGlobalCtorsList(), llvm::BlockFrequencyInfoImplBase::packageLoop(), false::LibCallsShrinkWrap::perform(), PerformHeapAllocSRoA(), llvm::LoopVectorizationPlanner::plan(), llvm::LoopVectorizationPlanner::planInVPlanNativePath(), pointerInvalidatedByLoop(), populateDependencyMatrix(), populateWorklist(), printFusionCandidates(), printLoopVector(), PrintOps(), llvm::AlignmentFromAssumptionsPass::processAssumption(), llvm::JumpThreadingPass::ProcessBlock(), processInternalGlobal(), llvm::LoopVectorizePass::processLoop(), processLoopInVPlanNativePath(), processPHI(), llvm::JumpThreadingPass::ProcessThreadableEdges(), promoteArguments(), promoteIndirectCalls(), promoteLoopAccessesToScalars(), pruneCache(), llvm::CFLAndersAAResult::query(), llvm::CFLSteensAAResult::query(), llvm::PMDataManager::removeDeadPasses(), llvm::PMDataManager::removeNotPreservedAnalysis(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::RemoveRedundantRoots(), replace(), llvm::SCEVExpander::replaceCongruentIVs(), replaceDominatedUsesWith(), llvm::InstCombiner::replaceInstUsesWith(), replaceSymbolicStrideSCEV(), ReplaceUsesOfWith(), llvm::objcarc::PtrState::ResetSequenceProgress(), llvm::SSAUpdaterBulk::RewriteAllUses(), rewriteDebugUsers(), llvm::ThinLTOCodeGenerator::run(), llvm::Attributor::run(), llvm::InstCombiner::run(), llvm::TruncInstCombine::run(), llvm::PassManager< IRUnitT, AnalysisManagerT, ExtraArgTs >::run(), llvm::CGSCCToFunctionPassAdaptor< FunctionPassT >::run(), llvm::DevirtSCCRepeatedPass< PassT >::run(), llvm::LoopDeletionPass::run(), llvm::SimpleLoopUnswitchPass::run(), llvm::VerifierAnalysis::run(), llvm::DeadArgumentEliminationPass::run(), llvm::ModuleToPostOrderCGSCCPassAdaptor< CGSCCPassT >::run(), runAttributorOnModule(), llvm::Float2IntPass::runImpl(), llvm::SLPVectorizerPass::runImpl(), llvm::JumpThreadingPass::runImpl(), llvm::SpeculativeExecutionPass::runImpl(), runIPSCCP(), llvm::MemorySSAPrinterLegacyPass::runOnFunction(), llvm::PredicateInfoPrinterLegacyPass::runOnFunction(), llvm::LegacyDivergenceAnalysis::runOnFunction(), llvm::RGPassManager::runOnFunction(), runSCCP(), salvageDebugInfoForDbgValues(), llvm::PMTopLevelManager::schedulePass(), llvm::LoopVectorizationCostModel::selectInterleaveCount(), llvm::LoopVectorizationCostModel::selectVectorizationFactor(), separateNestedLoop(), llvm::LoopVectorizationPlanner::setBestPlan(), llvm::InnerLoopVectorizer::setDebugLocFromInst(), llvm::BranchProbabilityInfo::setEdgeProbability(), llvm::objcarc::PtrState::SetKnownPositiveRefCount(), setProfMetadata(), llvm::objcarc::PtrState::SetSeq(), shouldInline(), shouldSplit(), SimplifyBranchOnICmpChain(), SimplifyCondBranchToCondBranch(), SimplifyCondBranchToTwoReturns(), simplifyOneLoop(), sink(), SinkCommonCodeFromPredecessors(), SinkInstruction(), sinkInstruction(), sinkRegion(), llvm::LoopPass::skipLoop(), llvm::RegionPass::skipRegion(), llvm::InstCombiner::SliceUpIllegalIntegerPHI(), llvm::SparseSolver< LatticeKey, LatticeVal, KeyInfo >::Solve(), SolveQuadraticAddRecExact(), SolveQuadraticAddRecRange(), speculatePHINodeLoads(), speculatePHIs(), speculateSelectInstLoads(), SpeculativelyExecuteBB(), splitCallSite(), SRAGlobal(), thinLTOResolvePrevailingInModule(), llvm::JumpThreadingPass::ThreadEdge(), llvm::JumpThreadingPass::ThreadGuard(), truncateIVUse(), tryToReplaceWithConstant(), tryToShorten(), TryToShrinkGlobalToBoolean(), TryToSimplifyUncondBranchFromEmptyBlock(), TryToSinkInstruction(), tryToSpeculatePHIs(), tryToUnrollAndJamLoop(), tryToUnrollLoop(), turnGuardIntoBranch(), UnrollAndJamLoop(), UnrollLoop(), UnrollRuntimeLoopRemainder(), unswitchBestCondition(), unswitchTrivialBranch(), unswitchTrivialSwitch(), unwrapLoop(), llvm::AbstractAttribute::update(), updateCGAndAnalysisManagerForFunctionPass(), AAReturnedValuesImpl::updateImpl(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::UpdateInsertion(), llvm::CallInst::updateProfWeight(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::UpdateRootsAfterUpdate(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::UpdateRootsBeforeInsertion(), value(), llvm::ValueHandleBase::ValueIsDeleted(), llvm::ValueHandleBase::ValueIsRAUWd(), values(), llvm::slpvectorizer::BoUpSLP::vectorizeTree(), llvm::ScalarEvolution::verify(), llvm::LoopInfoBase< BlockT, LoopT >::verify(), Verify(), llvm::VPlanVerifier::verifyHierarchicalCFG(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::verifyParentProperty(), llvm::sroa::AllocaSliceRewriter::visit(), llvm::InstCombiner::visitAllocaInst(), llvm::ObjectSizeOffsetVisitor::visitInstruction(), llvm::ObjectSizeOffsetEvaluator::visitInstruction(), llvm::InstCombiner::visitSExt(), llvm::InstCombiner::visitTrunc(), llvm::InstCombiner::visitZExt(), warnAboutLeftoverTransformations(), llvm::InnerLoopVectorizer::widenInstruction(), llvm::DebugCounter::~DebugCounter(), llvm::Value::~Value(), and llvm::ValueSymbolTable::~ValueSymbolTable().

◆ deallocate_buffer()

void llvm::deallocate_buffer ( void *  Ptr,
size_t  Size,
size_t  Alignment 
)
inline

Deallocate a buffer of memory with the given size and alignment.

If supported, this will used the sized delete operator. Also if supported, this will pass the alignment to the delete operator.

The pointer must have been allocated with the corresponding new operator, most likely using the above helper.

Definition at line 557 of file Compiler.h.

◆ debugVectorizationFailure()

static void llvm::debugVectorizationFailure ( const StringRef  DebugMsg,
Instruction I 
)
static

Definition at line 51 of file LoopVectorizationLegality.cpp.

References dbgs(), and I.

◆ decDigitValue()

static unsigned int llvm::decDigitValue ( unsigned int  c)
inlinestatic

Definition at line 219 of file APFloat.cpp.

Referenced by interpretDecimal(), readExponent(), and totalExponent().

◆ declareSanitizerInitFunction()

FunctionCallee llvm::declareSanitizerInitFunction ( Module M,
StringRef  InitName,
ArrayRef< Type * >  InitArgTypes 
)

◆ decodeSLEB128()

int64_t llvm::decodeSLEB128 ( const uint8_t *  p,
unsigned n = nullptr,
const uint8_t *  end = nullptr,
const char **  error = nullptr 
)
inline

Utility function to decode a SLEB128 value.

Definition at line 161 of file LEB128.h.

References error.

Referenced by llvm::DataExtractor::getSLEB128(), and llvm::BinaryStreamReader::readSLEB128().

◆ decodeULEB128()

uint64_t llvm::decodeULEB128 ( const uint8_t *  p,
unsigned n = nullptr,
const uint8_t *  end = nullptr,
const char **  error = nullptr 
)
inline

Utility function to decode a ULEB128 value.

Definition at line 128 of file LEB128.h.

References error.

Referenced by llvm::DataExtractor::getULEB128(), and llvm::BinaryStreamReader::readULEB128().

◆ decomposeBitTestICmp()

bool llvm::decomposeBitTestICmp ( Value LHS,
Value RHS,
CmpInst::Predicate Pred,
Value *&  X,
APInt &  Mask,
bool  LookThroughTrunc = true 
)

Decompose an icmp into the form ((X & Mask) pred 0) if possible.

The returned predicate is either == or !=. Returns false if decomposition fails.

Definition at line 66 of file CmpInstAnalysis.cpp.

References X().

Referenced by decomposeBitTestICmp(), foldSelectICmpAnd(), foldSignedTruncationCheck(), getMaskedTypeForICmpPair(), and simplifySelectWithFakeICmpEq().

◆ def_chain()

template<class T >
iterator_range< def_chain_iterator< T > > llvm::def_chain ( MA,
MemoryAccess UpTo = nullptr 
)
inline

Definition at line 1297 of file MemorySSA.h.

References assert(), and def_chain().

Referenced by checkClobberSanity(), and def_chain().

◆ DeleteDeadBlock()

void llvm::DeleteDeadBlock ( BasicBlock BB,
DomTreeUpdater DTU = nullptr,
bool  KeepOneInputPHIs = false 
)

Delete the specified block, which must have no predecessors.

Definition at line 88 of file BasicBlockUtils.cpp.

References DeleteDeadBlocks().

Referenced by CloneAndPruneIntoFromInst(), and llvm::JumpThreadingPass::runImpl().

◆ DeleteDeadBlocks()

void llvm::DeleteDeadBlocks ( ArrayRef< BasicBlock * >  BBs,
DomTreeUpdater DTU = nullptr,
bool  KeepOneInputPHIs = false 
)

Delete the specified blocks from BB.

The set of deleted blocks must have no predecessors that are not being deleted themselves. BBs must have no duplicating blocks. If there are loops among this set of blocks, all relevant loop info updates should be done before this function is called. If KeepOneInputPHIs is true, one-input Phis in successors of blocks being deleted will be preserved.

Definition at line 93 of file BasicBlockUtils.cpp.

References llvm::DomTreeUpdater::applyUpdatesPermissive(), assert(), llvm::DomTreeUpdater::deleteBB(), DetatchDeadBlocks(), and predecessors().

Referenced by DeleteDeadBlock(), and EliminateUnreachableBlocks().

◆ deleteDeadLoop()

void llvm::deleteDeadLoop ( Loop L,
DominatorTree DT = nullptr,
ScalarEvolution SE = nullptr,
LoopInfo LI = nullptr 
)

This function deletes dead loops.

The caller of this function needs to guarantee that the loop is infact dead. The function requires a bunch or prerequisites to be present:

  • The loop needs to be in LCSSA form
  • The loop needs to have a Preheader
  • A unique dedicated exit block must exist

This also updates the relevant analysis information in DT, SE, and LI if pointers to those are provided. It also updates the loop PM if an updater struct is provided.

Definition at line 450 of file LoopUtils.cpp.

References llvm::DomTreeUpdater::applyUpdates(), assert(), llvm::LoopBase< BlockT, LoopT >::block_begin(), llvm::LoopBase< BlockT, LoopT >::block_end(), llvm::LoopBase< BlockT, LoopT >::blocks(), llvm::LoopBase< BlockT, LoopT >::contains(), llvm::IRBuilder< T, Inserter >::CreateBr(), llvm::IRBuilder< T, Inserter >::CreateCondBr(), llvm::Instruction::eraseFromParent(), llvm::UndefValue::get(), llvm::IRBuilderBase::getFalse(), llvm::LoopBase< BlockT, LoopT >::getHeader(), llvm::IRBuilderBase::getInt32Ty(), llvm::LoopBase< BlockT, LoopT >::getLoopPreheader(), llvm::LoopBase< BlockT, LoopT >::getUniqueExitBlock(), llvm::Use::getUser(), llvm::LoopBase< BlockT, LoopT >::hasDedicatedExits(), I, llvm::Loop::isLCSSAForm(), P, llvm::Use::set(), and llvm::IRBuilderBase::SetInsertPoint().

Referenced by deleteLoopIfDead().

◆ DeleteDeadPHIs()

bool llvm::DeleteDeadPHIs ( BasicBlock BB,
const TargetLibraryInfo TLI = nullptr 
)

Examine each PHI in the given block and delete it if it is dead.

Also recursively delete any operands that become dead as a result. This includes tracing the def-use list from the PHI to see if it is ultimately unused or if it reaches an unused cycle. Return true if any PHIs were deleted.

Definition at line 156 of file BasicBlockUtils.cpp.

References llvm::BasicBlock::phis(), and RecursivelyDeleteDeadPHINode().

Referenced by ReduceLoopStrength().

◆ DemotePHIToStack()

AllocaInst * llvm::DemotePHIToStack ( PHINode P,
Instruction AllocaPoint = nullptr 
)

This function takes a virtual register computed by a phi node and replaces it with a slot in the stack frame, allocated via alloca.

DemotePHIToStack - This function takes a virtual register computed by a PHI node and replaces it with a slot in the stack frame allocated via alloca.

The phi node is deleted and it returns the pointer to the alloca inserted.

The PHI node is deleted. It returns the pointer to the alloca inserted.

Definition at line 110 of file DemoteRegToStack.cpp.

References assert(), F, llvm::DataLayout::getAllocaAddrSpace(), and P.

◆ DemoteRegToStack()

AllocaInst * llvm::DemoteRegToStack ( Instruction I,
bool  VolatileLoads = false,
Instruction AllocaPoint = nullptr 
)

This function takes a virtual register computed by an Instruction and replaces it with a slot in the stack frame, allocated via alloca.

DemoteRegToStack - This function takes a virtual register computed by an Instruction and replaces it with a slot in the stack frame, allocated via alloca.

This allows the CFG to be changed around without fear of invalidating the SSA information for the value. It returns the pointer to the alloca inserted to create a stack slot for X.

This allows the CFG to be changed around without fear of invalidating the SSA information for the value. It returns the pointer to the alloca inserted to create a stack slot for I.

Definition at line 23 of file DemoteRegToStack.cpp.

References assert(), F, llvm::DataLayout::getAllocaAddrSpace(), llvm::BasicBlock::getFirstInsertionPt(), llvm::InvokeInst::getNormalDest(), GetSuccessorNumber(), I, isCriticalEdge(), llvm::User::replaceUsesOfWith(), and SplitCriticalEdge().

◆ denormalizeForPostIncUse()

const SCEV * llvm::denormalizeForPostIncUse ( const SCEV S,
const PostIncLoopSet Loops,
ScalarEvolution SE 
)

Denormalize S to be post-increment for all loops present in Loops.

Definition at line 110 of file ScalarEvolutionNormalization.cpp.

References Denormalize, llvm::SCEVAddRecExpr::getLoop(), and Loops.

Referenced by llvm::IVUsers::AddUsersImpl().

◆ DetatchDeadBlocks()

void llvm::DetatchDeadBlocks ( ArrayRef< BasicBlock * >  BBs,
SmallVectorImpl< DominatorTree::UpdateType > *  Updates,
bool  KeepOneInputPHIs = false 
)

Replace contents of every block in BBs with single unreachable instruction.

If Updates is specified, collect all necessary DT updates into this vector. If KeepOneInputPHIs is true, one-input Phis in successors of blocks being deleted will be preserved.

Definition at line 54 of file BasicBlockUtils.cpp.

References assert(), llvm::UndefValue::get(), I, and successors().

Referenced by DeleteDeadBlocks().

◆ DiffFilesWithTolerance()

int llvm::DiffFilesWithTolerance ( StringRef  NameA,
StringRef  NameB,
double  AbsTol,
double  RelTol,
std::string *  Error = nullptr 
)

DiffFilesWithTolerance - Compare the two files specified, returning 0 if the files match, 1 if they are different, and 2 if there is a file error.

This function allows you to specify an absolute and relative FP error that is allowed to exist. If you specify a string to fill in for the error option, it will set the string to an error message if an error occurs, or if the files are different.

This function differs from DiffFiles in that you can specify an absolete and relative FP error that is allowed to exist. If you specify a string to fill in for the error option, it will set the string to an error message if an error occurs, allowing the caller to distinguish between a failed diff and a file system error.

Definition at line 176 of file FileUtilities.cpp.

References BackupNumber(), CompareNumbers(), llvm::ErrorOr< T >::get(), llvm::MemoryBuffer::getBufferEnd(), llvm::MemoryBuffer::getBufferSize(), llvm::MemoryBuffer::getBufferStart(), llvm::ErrorOr< T >::getError(), llvm::MemoryBuffer::getFile(), and isNumberChar().

◆ discoverAndMapSubloop()

template<class BlockT , class LoopT >
static void llvm::discoverAndMapSubloop ( LoopT *  L,
ArrayRef< BlockT * >  Backedges,
LoopInfoBase< BlockT, LoopT > *  LI,
const DomTreeBase< BlockT > &  DomTree 
)
static

Stable LoopInfo Analysis - Build a loop tree using stable iterators so the result does / not depend on use list (block predecessor) order.

Discover a subloop with the specified backedges such that: All blocks within this loop are mapped to this loop or a subloop. And all subloops within this loop have their parent loop set to this loop or a subloop.

Definition at line 420 of file LoopInfoImpl.h.

References llvm::LoopInfoBase< BlockT, LoopT >::changeLoopFor(), llvm::LoopInfoBase< BlockT, LoopT >::getLoopFor(), and llvm::DominatorTreeBase< NodeT, IsPostDom >::isReachableFromEntry().

Referenced by llvm::LoopInfoBase< BlockT, LoopT >::analyze().

◆ DisplayGraph()

bool llvm::DisplayGraph ( StringRef  Filename,
bool  wait = true,
GraphProgram::Name  program = GraphProgram::DOT 
)

Definition at line 148 of file GraphWriter.cpp.

References errs(), ExecGraphViewer(), getProgramName(), llvm_unreachable, and ViewBackground.

Referenced by ViewGraph().

◆ divideCeil()

uint64_t llvm::divideCeil ( uint64_t  Numerator,
uint64_t  Denominator 
)
inline

Returns the integer ceil(Numerator / Denominator).

Definition at line 703 of file MathExtras.h.

References alignTo().

Referenced by llvm::msf::bytesToBlocks(), llvm::msf::getFpmStreamLayout(), and llvm::msf::getNumFpmIntervals().

◆ djbHash()

uint32_t llvm::djbHash ( StringRef  Buffer,
uint32_t  H = 5381 
)
inline

The Bernstein hash function used by the DWARF accelerator tables.

Definition at line 21 of file DJB.h.

References H.

Referenced by caseFoldingDjbHash(), and llvm::AppleAcceleratorTable::equal_range().

◆ DoubleToBits()

uint64_t llvm::DoubleToBits ( double  Double)
inline

This function takes a double and returns the bit equivalent 64-bit integer.

Note that copying doubles around changes the bits of NaNs on some hosts, notably x86, so this routine cannot be used if these bits are needed.

Definition at line 595 of file MathExtras.h.

Referenced by llvm::support::endian::write< double >().

◆ dropDebugUsers()

void llvm::dropDebugUsers ( Instruction I)

Remove the debug intrinsic instructions for the given instruction.

Definition at line 2549 of file Local.cpp.

References findDbgUsers(), and I.

Referenced by hoistAllInstructionsInto().

◆ DuplicateInstructionsInSplitBetween()

BasicBlock * llvm::DuplicateInstructionsInSplitBetween ( BasicBlock BB,
BasicBlock PredBB,
Instruction StopAt,
ValueToValueMapTy ValueMapping,
DomTreeUpdater DTU 
)

Split edge between BB and PredBB and duplicate all non-Phi instructions from BB between its beginning and the StopAt instruction into the split block.

Duplicate non-Phi instructions from the beginning of block up to StopAt instruction into a split block between BB and its predecessor.

Phi nodes are not duplicated, but their uses are handled correctly: we replace them with the uses of corresponding Phi inputs. ValueMapping is used to map the original instructions from BB to their newly-created copies. Returns the split block.

Definition at line 820 of file CloneFunction.cpp.

References llvm::DomTreeUpdater::applyUpdates(), assert(), llvm::BasicBlock::begin(), llvm::ValueMap< KeyT, ValueT, Config >::end(), llvm::ValueMap< KeyT, ValueT, Config >::find(), llvm::PHINode::getIncomingValueForBlock(), llvm::Value::getName(), llvm::User::getNumOperands(), llvm::User::getOperand(), llvm::BasicBlock::getTerminator(), I, llvm::Instruction::insertBefore(), llvm::Value::setName(), llvm::User::setOperand(), SplitEdge(), and successors().

Referenced by splitCallSite(), and llvm::JumpThreadingPass::ThreadGuard().

◆ dyn_cast() [1/3]

template<class X , class Y >
LLVM_NODISCARD std::enable_if<!is_simple_type< Y >::value, typenamecast_retty< X, constY >::ret_type >::type llvm::dyn_cast ( const Y Val)
inline

Definition at line 332 of file Casting.h.

◆ dyn_cast() [2/3]

template<class X , class Y >
LLVM_NODISCARD cast_retty< X, Y >::ret_type llvm::dyn_cast ( Y Val)
inline

Definition at line 337 of file Casting.h.

◆ dyn_cast() [3/3]

template<class X , class Y >
LLVM_NODISCARD cast_retty< X, Y * >::ret_type llvm::dyn_cast ( Y Val)
inline

Definition at line 342 of file Casting.h.

◆ dyn_cast_or_null() [1/3]

template<class X , class Y >
LLVM_NODISCARD std::enable_if<!is_simple_type< Y >::value, typenamecast_retty< X, constY >::ret_type >::type llvm::dyn_cast_or_null ( const Y Val)
inline

Definition at line 353 of file Casting.h.

◆ dyn_cast_or_null() [2/3]

template<class X , class Y >
LLVM_NODISCARD std::enable_if<!is_simple_type< Y >::value, typenamecast_retty< X, Y >::ret_type >::type llvm::dyn_cast_or_null ( Y Val)
inline

Definition at line 361 of file Casting.h.

◆ dyn_cast_or_null() [3/3]

template<class X , class Y >
LLVM_NODISCARD cast_retty< X, Y * >::ret_type llvm::dyn_cast_or_null ( Y Val)
inline

Definition at line 367 of file Casting.h.

◆ EliminateDuplicatePHINodes()

bool llvm::EliminateDuplicatePHINodes ( BasicBlock BB)

Check for and eliminate duplicate PHI nodes in this block.

EliminateDuplicatePHINodes - Check for and eliminate duplicate PHI nodes in this block.

This doesn't try to be clever about PHI nodes which differ only in the order of the incoming values, but instcombine orders them so it usually won't matter.

Definition at line 1095 of file Local.cpp.

References llvm::BasicBlock::begin(), llvm::PHINode::block_begin(), llvm::PHINode::block_end(), llvm::DenseMapInfo< LocationSize >::getEmptyKey(), llvm::DenseMapInfo< LocationSize >::getTombstoneKey(), I, isEqual(), llvm::Instruction::isIdenticalTo(), llvm::User::value_op_begin(), and llvm::User::value_op_end().

◆ EliminateUnreachableBlocks()

bool llvm::EliminateUnreachableBlocks ( Function F,
DomTreeUpdater DTU = nullptr,
bool  KeepOneInputPHIs = false 
)

Delete all basic blocks from F that are not reachable from its entry node.

If KeepOneInputPHIs is true, one-input Phis in successors of blocks being deleted will be preserved.

Definition at line 117 of file BasicBlockUtils.cpp.

References DeleteDeadBlocks(), F, and I.

Referenced by splitCoroutine().

◆ emitBCmp()

Value * llvm::emitBCmp ( Value Ptr1,
Value Ptr2,
Value Len,
IRBuilder<> &  B,
const DataLayout DL,
const TargetLibraryInfo TLI 
)

◆ emitBinaryFloatFnCall()

Value * llvm::emitBinaryFloatFnCall ( Value Op1,
Value Op2,
StringRef  Name,
IRBuilder<> &  B,
const AttributeList Attrs 
)

Emit a call to the binary function named 'Name' (e.g.

'fmin'). This function is known to take type matching 'Op1' and 'Op2' and return one value with the same type. If 'Op1/Op2' are long double, 'l' is added as the suffix of name, if 'Op1/Op2' are float, we add a 'f' suffix.

Definition at line 1054 of file BuildLibCalls.cpp.

References appendTypeSuffix(), assert(), llvm::IRBuilder< T, Inserter >::CreateCall(), F, llvm::IRBuilderBase::GetInsertBlock(), llvm::BasicBlock::getModule(), llvm::Value::getType(), llvm::CallBase::setAttributes(), and llvm::CallBase::setCallingConv().

Referenced by optimizeDoubleFP().

◆ emitCalloc()

Value * llvm::emitCalloc ( Value Num,
Value Size,
const AttributeList Attrs,
IRBuilder<> &  B,
const TargetLibraryInfo TLI 
)

◆ emitFGetCUnlocked()

Value * llvm::emitFGetCUnlocked ( Value File,
IRBuilder<> &  B,
const TargetLibraryInfo TLI 
)

◆ emitFGetSUnlocked()

Value * llvm::emitFGetSUnlocked ( Value Str,
Value Size,
Value File,
IRBuilder<> &  B,
const TargetLibraryInfo TLI 
)

◆ emitFPutC()

Value * llvm::emitFPutC ( Value Char,
Value File,
IRBuilder<> &  B,
const TargetLibraryInfo TLI 
)

◆ emitFPutCUnlocked()

Value * llvm::emitFPutCUnlocked ( Value Char,
Value File,
IRBuilder<> &  B,
const TargetLibraryInfo TLI 
)

◆ emitFPutS()

Value * llvm::emitFPutS ( Value Str,
Value File,
IRBuilder<> &  B,
const TargetLibraryInfo TLI 
)

◆ emitFPutSUnlocked()

Value * llvm::emitFPutSUnlocked ( Value Str,
Value File,
IRBuilder<> &  B,
const TargetLibraryInfo TLI 
)

◆ emitFReadUnlocked()

Value * llvm::emitFReadUnlocked ( Value Ptr,
Value Size,
Value N,
Value File,
IRBuilder<> &  B,
const DataLayout DL,
const TargetLibraryInfo TLI 
)

◆ emitFWrite()

Value * llvm::emitFWrite ( Value Ptr,
Value Size,
Value File,
IRBuilder<> &  B,
const DataLayout DL,
const TargetLibraryInfo TLI 
)

◆ emitFWriteUnlocked()

Value * llvm::emitFWriteUnlocked ( Value Ptr,
Value Size,
Value N,
Value File,
IRBuilder<> &  B,
const DataLayout DL,
const TargetLibraryInfo TLI 
)

◆ EmitGEPOffset()

template<typename IRBuilderTy >
Value * llvm::EmitGEPOffset ( IRBuilderTy *  Builder,
const DataLayout DL,
User GEP,
bool  NoAssumptions = false 
)

◆ EmitImportsFiles()

std::error_code llvm::EmitImportsFiles ( StringRef  ModulePath,
StringRef  OutputFilename,
const std::map< std::string, GVSummaryMapTy > &  ModuleToSummariesForIndex 
)

Emit into OutputFilename the files module ModulePath will import from.

Emit the files ModulePath will import from into OutputFilename.

Definition at line 891 of file FunctionImport.cpp.

Referenced by llvm::ThinLTOCodeGenerator::emitImports().

◆ emitLinkerFlagsForGlobalCOFF()

void llvm::emitLinkerFlagsForGlobalCOFF ( raw_ostream OS,
const GlobalValue GV,
const Triple &  TT,
Mangler Mangler 
)

◆ emitLinkerFlagsForUsedCOFF()

void llvm::emitLinkerFlagsForUsedCOFF ( raw_ostream OS,
const GlobalValue GV,
const Triple &  T,
Mangler M 
)

Definition at line 215 of file Mangler.cpp.

◆ emitMalloc()

Value * llvm::emitMalloc ( Value Num,
IRBuilder<> &  B,
const DataLayout DL,
const TargetLibraryInfo TLI 
)

◆ emitMemCCpy()

Value * llvm::emitMemCCpy ( Value Ptr1,
Value Ptr2,
Value Val,
Value Len,
IRBuilder<> &  B,
const TargetLibraryInfo TLI 
)

Emit a call to the memccpy function.

Definition at line 926 of file BuildLibCalls.cpp.

References emitLibCall(), and llvm::IRBuilderBase::getInt8PtrTy().

◆ emitMemChr()

Value * llvm::emitMemChr ( Value Ptr,
Value Val,
Value Len,
IRBuilder<> &  B,
const DataLayout DL,
const TargetLibraryInfo TLI 
)

Emit a call to the memchr function.

This assumes that Ptr is a pointer, Val is an i32 value, and Len is an 'intptr_t' value.

Definition at line 899 of file BuildLibCalls.cpp.

References emitLibCall(), llvm::BasicBlock::getContext(), llvm::IRBuilderBase::GetInsertBlock(), and llvm::IRBuilderBase::getInt8PtrTy().

◆ emitMemCmp()

Value * llvm::emitMemCmp ( Value Ptr1,
Value Ptr2,
Value Len,
IRBuilder<> &  B,
const DataLayout DL,
const TargetLibraryInfo TLI 
)

Emit a call to the memcmp function.

Definition at line 908 of file BuildLibCalls.cpp.

References emitLibCall(), llvm::BasicBlock::getContext(), llvm::IRBuilderBase::GetInsertBlock(), and llvm::IRBuilderBase::getInt32Ty().

◆ emitMemCpyChk()

Value * llvm::emitMemCpyChk ( Value Dst,
Value Src,
Value Len,
Value ObjSize,
IRBuilder<> &  B,
const DataLayout DL,
const TargetLibraryInfo TLI 
)

◆ emitPutChar()

Value * llvm::emitPutChar ( Value Char,
IRBuilder<> &  B,
const TargetLibraryInfo TLI 
)

◆ emitPutS()

Value * llvm::emitPutS ( Value Str,
IRBuilder<> &  B,
const TargetLibraryInfo TLI 
)

◆ emitSNPrintf()

Value * llvm::emitSNPrintf ( Value Dest,
Value Size,
Value Fmt,
ArrayRef< Value * >  Args,
IRBuilder<> &  B,
const TargetLibraryInfo TLI 
)

Emit a call to the snprintf function.

Definition at line 934 of file BuildLibCalls.cpp.

References castToCStr(), emitLibCall(), and llvm::IRBuilderBase::getInt32Ty().

◆ emitSPrintf()

Value * llvm::emitSPrintf ( Value Dest,
Value Fmt,
ArrayRef< Value * >  VariadicArgs,
IRBuilder<> &  B,
const TargetLibraryInfo TLI 
)

Emit a call to the sprintf function.

Definition at line 944 of file BuildLibCalls.cpp.

References castToCStr(), emitLibCall(), and llvm::IRBuilderBase::getInt32Ty().

◆ emitStpCpy()

Value * llvm::emitStpCpy ( Value Dst,
Value Src,
IRBuilder<> &  B,
const TargetLibraryInfo TLI 
)

Emit a call to the stpcpy function to the builder, for the specified pointer arguments.

Definition at line 854 of file BuildLibCalls.cpp.

References castToCStr(), emitLibCall(), and llvm::IRBuilderBase::getInt8PtrTy().

◆ emitStpNCpy()

Value * llvm::emitStpNCpy ( Value Dst,
Value Src,
Value Len,
IRBuilder<> &  B,
const TargetLibraryInfo TLI 
)

Emit a call to the stpncpy function to the builder, for the specified pointer arguments and length.

Definition at line 868 of file BuildLibCalls.cpp.

References castToCStr(), emitLibCall(), llvm::IRBuilderBase::getInt8PtrTy(), and llvm::Value::getType().

◆ emitStrCat()

Value * llvm::emitStrCat ( Value Dest,
Value Src,
IRBuilder<> &  B,
const TargetLibraryInfo TLI 
)

Emit a call to the strcat function.

Definition at line 954 of file BuildLibCalls.cpp.

References emitLibCall(), and llvm::IRBuilderBase::getInt8PtrTy().

◆ emitStrChr()

Value * llvm::emitStrChr ( Value Ptr,
char  C,
IRBuilder<> &  B,
const TargetLibraryInfo TLI 
)

Emit a call to the strchr function to the builder, for the specified pointer and character.

Ptr is required to be some pointer type, and the return value has 'i8*' type.

Definition at line 830 of file BuildLibCalls.cpp.

References castToCStr(), emitLibCall(), llvm::ConstantInt::get(), llvm::IRBuilderBase::getInt32Ty(), and llvm::IRBuilderBase::getInt8PtrTy().

◆ emitStrCpy()

Value * llvm::emitStrCpy ( Value Dst,
Value Src,
IRBuilder<> &  B,
const TargetLibraryInfo TLI 
)

Emit a call to the strcpy function to the builder, for the specified pointer arguments.

Definition at line 847 of file BuildLibCalls.cpp.

References castToCStr(), emitLibCall(), and llvm::IRBuilderBase::getInt8PtrTy().

◆ emitStrLCat()

Value * llvm::emitStrLCat ( Value Dest,
Value Src,
Value Size,
IRBuilder<> &  B,
const TargetLibraryInfo TLI 
)

Emit a call to the strlcat function.

Definition at line 968 of file BuildLibCalls.cpp.

References emitLibCall().

◆ emitStrLCpy()

Value * llvm::emitStrLCpy ( Value Dest,
Value Src,
Value Size,
IRBuilder<> &  B,
const TargetLibraryInfo TLI 
)

Emit a call to the strlcpy function.

Definition at line 961 of file BuildLibCalls.cpp.

References emitLibCall().

◆ emitStrLen()

Value * llvm::emitStrLen ( Value Ptr,
IRBuilder<> &  B,
const DataLayout DL,
const TargetLibraryInfo TLI 
)

Emit a call to the strlen function to the builder, for the specified pointer.

Ptr is required to be some pointer type, and the return value has 'intptr_t' type.

Definition at line 823 of file BuildLibCalls.cpp.

References castToCStr(), emitLibCall(), llvm::BasicBlock::getContext(), llvm::IRBuilderBase::GetInsertBlock(), llvm::IRBuilderBase::getInt8PtrTy(), and llvm::DataLayout::getIntPtrType().

◆ emitStrNCat()

Value * llvm::emitStrNCat ( Value Dest,
Value Src,
Value Size,
IRBuilder<> &  B,
const TargetLibraryInfo TLI 
)

Emit a call to the strncat function.

Definition at line 975 of file BuildLibCalls.cpp.

References emitLibCall(), and llvm::IRBuilderBase::getInt8PtrTy().

◆ emitStrNCmp()

Value * llvm::emitStrNCmp ( Value Ptr1,
Value Ptr2,
Value Len,
IRBuilder<> &  B,
const DataLayout DL,
const TargetLibraryInfo TLI 
)

Emit a call to the strncmp function to the builder.

Definition at line 838 of file BuildLibCalls.cpp.

References emitLibCall(), llvm::BasicBlock::getContext(), llvm::IRBuilderBase::GetInsertBlock(), and llvm::IRBuilderBase::getInt32Ty().

◆ emitStrNCpy()

Value * llvm::emitStrNCpy ( Value Dst,
Value Src,
Value Len,
IRBuilder<> &  B,
const TargetLibraryInfo TLI 
)

Emit a call to the strncpy function to the builder, for the specified pointer arguments and length.

Definition at line 861 of file BuildLibCalls.cpp.

References castToCStr(), emitLibCall(), llvm::IRBuilderBase::getInt8PtrTy(), and llvm::Value::getType().

◆ emitStrNLen()

Value * llvm::emitStrNLen ( Value Ptr,
Value MaxLen,
IRBuilder<> &  B,
const DataLayout DL,
const TargetLibraryInfo TLI 
)

Emit a call to the strnlen function to the builder, for the specified pointer.

Ptr is required to be some pointer type, MaxLen must be of size_t type, and the return value has 'intptr_t' type.

◆ emitUnaryFloatFnCall() [1/2]

Value * llvm::emitUnaryFloatFnCall ( Value Op,
const TargetLibraryInfo TLI,
LibFunc  DoubleFn,
LibFunc  FloatFn,
LibFunc  LongDoubleFn,
IRBuilder<> &  B,
const AttributeList Attrs 
)

Emit a call to the unary function DoubleFn, FloatFn or LongDoubleFn, depending of the type of Op.

Definition at line 1043 of file BuildLibCalls.cpp.

References emitUnaryFloatFnCallHelper(), llvm::Value::getType(), and getUnaryFloatFn().

◆ emitUnaryFloatFnCall() [2/2]

Value * llvm::emitUnaryFloatFnCall ( Value Op,
StringRef  Name,
IRBuilder<> &  B,
const AttributeList Attrs 
)

Emit a call to the unary function named 'Name' (e.g.

'floor'). This function is known to take a single of type matching 'Op' and returns one value with the same type. If 'Op' is a long double, 'l' is added as the suffix of name, if 'Op' is a float, we add a 'f' suffix.

Definition at line 1035 of file BuildLibCalls.cpp.

References appendTypeSuffix(), and emitUnaryFloatFnCallHelper().

Referenced by getSqrtCall(), optimizeDoubleFP(), and llvm::InstCombiner::visitFDiv().

◆ emitVSNPrintf()

Value * llvm::emitVSNPrintf ( Value Dest,
Value Size,
Value Fmt,
Value VAList,
IRBuilder<> &  B,
const TargetLibraryInfo TLI 
)

Emit a call to the vsnprintf function.

Definition at line 982 of file BuildLibCalls.cpp.

References emitLibCall(), and llvm::IRBuilderBase::getInt32Ty().

◆ emitVSPrintf()

Value * llvm::emitVSPrintf ( Value Dest,
Value Fmt,
Value VAList,
IRBuilder<> &  B,
const TargetLibraryInfo TLI 
)

Emit a call to the vsprintf function.

Definition at line 990 of file BuildLibCalls.cpp.

References emitLibCall(), and llvm::IRBuilderBase::getInt32Ty().

◆ EnablePrettyStackTrace()

void llvm::EnablePrettyStackTrace ( )

Enables dumping a "pretty" stack trace when the program crashes.

See also
PrettyStackTraceEntry

Definition at line 221 of file PrettyStackTrace.cpp.

References RegisterCrashPrinter().

Referenced by LLVMEnablePrettyStackTrace(), and llvm::PrettyStackTraceProgram::PrettyStackTraceProgram().

◆ EnablePrettyStackTraceOnSigInfoForThisThread()

void llvm::EnablePrettyStackTraceOnSigInfoForThisThread ( bool  ShouldEnable = true)

Enables (or disables) dumping a "pretty" stack trace when the user sends SIGINFO or SIGUSR1 to the current process.

This is a per-thread decision so that a program can choose to print stack traces only on a primary thread, or on all threads that use PrettyStackTraceEntry.

See also
EnablePrettyStackTrace
PrettyStackTraceEntry

Definition at line 229 of file PrettyStackTrace.cpp.

References GlobalSigInfoGenerationCounter, llvm::sys::SetInfoSignalFunction(), and ThreadLocalSigInfoGenerationCounter.

◆ encodeSLEB128() [1/2]

unsigned llvm::encodeSLEB128 ( int64_t  Value,
raw_ostream OS,
unsigned  PadTo = 0 
)
inline

Utility function to encode a SLEB128 value to an output stream.

Returns the length in bytes of the encoded value.

Definition at line 23 of file LEB128.h.

Referenced by llvm::BinaryStreamWriter::writeSLEB128().

◆ encodeSLEB128() [2/2]

unsigned llvm::encodeSLEB128 ( int64_t  Value,
uint8_t *  p,
unsigned  PadTo = 0 
)
inline

Utility function to encode a SLEB128 value to a buffer.

Returns the length in bytes of the encoded value.

Definition at line 52 of file LEB128.h.

◆ encodeULEB128() [1/2]

unsigned llvm::encodeULEB128 ( uint64_t  Value,
raw_ostream OS,
unsigned  PadTo = 0 
)
inline

Utility function to encode a ULEB128 value to an output stream.

Returns the length in bytes of the encoded value.

Definition at line 80 of file LEB128.h.

Referenced by llvm::BinaryStreamWriter::writeULEB128().

◆ encodeULEB128() [2/2]

unsigned llvm::encodeULEB128 ( uint64_t  Value,
uint8_t *  p,
unsigned  PadTo = 0 
)
inline

Utility function to encode a ULEB128 value to a buffer.

Returns the length in bytes of the encoded value.

Definition at line 104 of file LEB128.h.

◆ errorCodeToError()

Error llvm::errorCodeToError ( std::error_code  EC)

◆ errorOrToExpected()

template<typename T >
Expected< T > llvm::errorOrToExpected ( ErrorOr< T > &&  EO)

Convert an ErrorOr<T> to an Expected<T>.

Definition at line 1103 of file Error.h.

References errorCodeToError().

◆ errorToBool()

bool llvm::errorToBool ( Error  Err)
inline

Helper for converting an Error to a bool.

This method returns true if Err is in an error state, or false if it is in a success state. Puts Err in a checked state in both cases (unlike Error::operator bool(), which only does this for success states).

Definition at line 990 of file Error.h.

References consumeError().

Referenced by llvm::LTOModule::getProducerString(), llvm::LTOModule::isBitcodeFile(), and llvm::LTOModule::isBitcodeForTarget().

◆ errorToErrorCode()

std::error_code llvm::errorToErrorCode ( Error  Err)

Helper for converting an ECError to a std::error_code.

This method requires that Err be Error() or an ECError, otherwise it will trigger a call to abort().

Definition at line 93 of file Error.cpp.

References llvm::ErrorInfoBase::convertToErrorCode(), handleAllErrors(), inconvertibleErrorCode(), and report_fatal_error().

Referenced by llvm::symbolize::SymbolizableObjectFile::create(), expectedToErrorOr(), llvm::MemoryBuffer::getFileAsStream(), getFileAux(), getReadWriteFile(), llvm::lto::localCache(), and parseBitcodeFileImpl().

◆ errs()

raw_ostream & llvm::errs ( )

This returns a reference to a raw_ostream for standard error.

errs() - This returns a reference to a raw_ostream for standard error.

Use it like: errs() << "foo" << "bar";

Definition at line 853 of file raw_ostream.cpp.

Referenced by CheckBitcodeOutputToConsole(), CrashHandler(), createGraphFilename(), dbgs(), llvm::LLVMContext::diagnose(), DisplayGraph(), doImportingForModule(), llvm::DWARFDie::dump(), llvm::SMTSort::dump(), llvm::SMTExpr::dump(), llvm::SMTSolver::dump(), dumpDataAux(), llvm::LPPassManager::dumpPassStructure(), llvm::RGPassManager::dumpPassStructure(), llvm::WithColor::error(), ExecGraphViewer(), llvm::CodeExtractor::extractCodeRegion(), ferrs(), findBasePointers(), getProcCpuinfoContent(), llvm::lto::getThinLTOOutputFile(), insertParsePoints(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::IsSameAsFreshTree(), llvm::LTOModule::isThinLTO(), llvm::ThinLTOCodeGenerator::linkCombinedIndex(), LLVMDumpModule(), LLVMDumpType(), LLVMDumpValue(), LLVMSetLinkage(), LLVMVerifyFunction(), LLVMVerifyModule(), loadFile(), llvm::lto::localCache(), llvm::WithColor::note(), llvm::PluginLoader::operator=(), llvm::LTOCodeGenerator::optimize(), OptimizeGlobalAddressOfMalloc(), llvm::ARMAttributeParser::Parse(), parseCHRFilterFiles(), llvm::FileCheckPattern::parsePattern(), llvm::PassNameParser::passRegistered(), llvm::detail::printBumpPtrAllocatorStats(), printForSigInfoIfNeeded(), PrintLoadStoreResults(), llvm::SourceMgr::PrintMessage(), PrintModRefResults(), PrintNoMatch(), printPassMessage(), PrintPercent(), PrintRecyclerStats(), PrintResults(), llvm::DebugCounter::push_back(), llvm::FileCheck::ReadCheckFile(), llvm::WithColor::remark(), reportOpenError(), llvm::ThinLTOCodeGenerator::run(), llvm::DOTGraphTraitsPrinter< AnalysisT, IsSimple, GraphT, AnalysisGraphTraitsT >::runOnFunction(), llvm::DOTGraphTraitsModulePrinter< AnalysisT, IsSimple, GraphT, AnalysisGraphTraitsT >::runOnModule(), UpgradeDebugInfo(), llvm::PHITransAddr::Verify(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::VerifyDFSNumbers(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::VerifyLevels(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::verifyParentProperty(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::verifyReachability(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::verifyRoots(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::verifySiblingProperty(), VerifySubExpr(), llvm::DominatorTree::viewGraph(), llvm::WithColor::warning(), writeCFGToDotFile(), llvm::ThinLTOCodeGenerator::writeGeneratedObject(), and llvm::AAEvaluator::~AAEvaluator().

◆ expandDivision()

bool llvm::expandDivision ( BinaryOperator Div)

Generate code to divide two integers, replacing Div with the generated code.

This currently generates code similarly to compiler-rt's implementations, but future work includes generating more specialized code when more information about the operands are known. Implements both 32bit and 64bit scalar division.

Replace Div with generated code.

Definition at line 433 of file IntegerDivision.cpp.

References assert(), llvm::User::dropAllReferences(), llvm::Instruction::eraseFromParent(), generateSignedDivisionCode(), generateUnsignedDivisionCode(), llvm::IRBuilderBase::GetInsertPoint(), llvm::Type::getIntegerBitWidth(), llvm::BinaryOperator::getOpcode(), llvm::User::getOperand(), llvm::Value::getType(), llvm::Type::isVectorTy(), and llvm::Value::replaceAllUsesWith().

Referenced by expandDivisionUpTo32Bits(), expandDivisionUpTo64Bits(), and expandRemainder().

◆ expandDivisionUpTo32Bits()

bool llvm::expandDivisionUpTo32Bits ( BinaryOperator Div)

Generate code to divide two integers, replacing Div with the generated code.

Generate code to divide two integers of bitwidth up to 32 bits.

Uses ExpandDivision with a 32bit Div which makes it useful for targets with little or no support for less than 32 bit arithmetic.

Replace Rem with generated code.

Uses the above routines and extends the inputs/truncates the outputs to operate in 32 bits; that is, these routines are good for targets that have no or very little support for smaller than 32 bit integer arithmetic.

Replace Div with emulation code.

Definition at line 583 of file IntegerDivision.cpp.

References assert(), llvm::IRBuilder< T, Inserter >::CreateSDiv(), llvm::IRBuilder< T, Inserter >::CreateSExt(), llvm::IRBuilder< T, Inserter >::CreateTrunc(), llvm::IRBuilder< T, Inserter >::CreateUDiv(), llvm::IRBuilder< T, Inserter >::CreateZExt(), llvm::User::dropAllReferences(), llvm::Instruction::eraseFromParent(), expandDivision(), llvm::IRBuilderBase::getInt32Ty(), llvm::Type::getIntegerBitWidth(), llvm::BinaryOperator::getOpcode(), llvm::User::getOperand(), llvm::Value::getType(), llvm::Type::isVectorTy(), and llvm::Value::replaceAllUsesWith().

◆ expandDivisionUpTo64Bits()

bool llvm::expandDivisionUpTo64Bits ( BinaryOperator Div)

Generate code to divide two integers, replacing Div with the generated code.

Generate code to divide two integers of bitwidth up to 64 bits.

Uses ExpandDivision with a 64bit Div.

Replace Rem with generated code.

Uses the above routines and extends the inputs/truncates the outputs to operate in 64 bits.

Replace Div with emulation code.

Definition at line 631 of file IntegerDivision.cpp.

References assert(), llvm::IRBuilder< T, Inserter >::CreateSDiv(), llvm::IRBuilder< T, Inserter >::CreateSExt(), llvm::IRBuilder< T, Inserter >::CreateTrunc(), llvm::IRBuilder< T, Inserter >::CreateUDiv(), llvm::IRBuilder< T, Inserter >::CreateZExt(), llvm::User::dropAllReferences(), llvm::Instruction::eraseFromParent(), expandDivision(), llvm::IRBuilderBase::getInt64Ty(), llvm::Type::getIntegerBitWidth(), llvm::BinaryOperator::getOpcode(), llvm::User::getOperand(), llvm::Value::getType(), llvm::Type::isVectorTy(), and llvm::Value::replaceAllUsesWith().

◆ expandMemCpyAsLoop()

void llvm::expandMemCpyAsLoop ( MemCpyInst MemCpy,
const TargetTransformInfo TTI 
)

◆ expandMemMoveAsLoop()

void llvm::expandMemMoveAsLoop ( MemMoveInst MemMove)

◆ expandMemSetAsLoop()

void llvm::expandMemSetAsLoop ( MemSetInst MemSet)

◆ expandRemainder()

bool llvm::expandRemainder ( BinaryOperator Rem)

Generate code to calculate the remainder of two integers, replacing Rem with the generated code.

This currently generates code using the udiv expansion, but future work includes generating more specialized code, e.g. when more information about the operands are known. Implements both 32bit and 64bit scalar division.

Replace Rem with generated code.

Definition at line 375 of file IntegerDivision.cpp.

References assert(), llvm::User::dropAllReferences(), llvm::Instruction::eraseFromParent(), expandDivision(), generatedUnsignedRemainderCode(), generateSignedRemainderCode(), llvm::IRBuilderBase::GetInsertPoint(), llvm::Type::getIntegerBitWidth(), llvm::BinaryOperator::getOpcode(), llvm::User::getOperand(), llvm::Value::getType(), llvm::Type::isVectorTy(), and llvm::Value::replaceAllUsesWith().

Referenced by expandRemainderUpTo32Bits(), and expandRemainderUpTo64Bits().

◆ expandRemainderUpTo32Bits()

bool llvm::expandRemainderUpTo32Bits ( BinaryOperator Rem)

Generate code to calculate the remainder of two integers, replacing Rem with the generated code.

Generate code to compute the remainder of two integers of bitwidth up to 32 bits.

Uses ExpandReminder with a 32bit Rem which makes it useful for targets with little or no support for less than 32 bit arithmetic.

Replace Rem with generated code.

Uses the above routines and extends the inputs/truncates the outputs to operate in 32 bits; that is, these routines are good for targets that have no or very little suppport for smaller than 32 bit integer arithmetic.

Replace Rem with emulation code.

Definition at line 485 of file IntegerDivision.cpp.

References assert(), llvm::IRBuilder< T, Inserter >::CreateSExt(), llvm::IRBuilder< T, Inserter >::CreateSRem(), llvm::IRBuilder< T, Inserter >::CreateTrunc(), llvm::IRBuilder< T, Inserter >::CreateURem(), llvm::IRBuilder< T, Inserter >::CreateZExt(), llvm::User::dropAllReferences(), llvm::Instruction::eraseFromParent(), expandRemainder(), llvm::IRBuilderBase::getInt32Ty(), llvm::Type::getIntegerBitWidth(), llvm::BinaryOperator::getOpcode(), llvm::User::getOperand(), llvm::Value::getType(), llvm::Type::isVectorTy(), and llvm::Value::replaceAllUsesWith().

◆ expandRemainderUpTo64Bits()

bool llvm::expandRemainderUpTo64Bits ( BinaryOperator Rem)

Generate code to calculate the remainder of two integers, replacing Rem with the generated code.

Generate code to compute the remainder of two integers of bitwidth up to 64 bits.

Uses ExpandReminder with a 64bit Rem.

Replace Rem with generated code.

Uses the above routines and extends the inputs/truncates the outputs to operate in 64 bits.

Replace Rem with emulation code.

Definition at line 534 of file IntegerDivision.cpp.

References assert(), llvm::IRBuilder< T, Inserter >::CreateSExt(), llvm::IRBuilder< T, Inserter >::CreateSRem(), llvm::IRBuilder< T, Inserter >::CreateTrunc(), llvm::IRBuilder< T, Inserter >::CreateURem(), llvm::IRBuilder< T, Inserter >::CreateZExt(), llvm::User::dropAllReferences(), llvm::Instruction::eraseFromParent(), expandRemainder(), llvm::IRBuilderBase::getInt64Ty(), llvm::Type::getIntegerBitWidth(), llvm::BinaryOperator::getOpcode(), llvm::User::getOperand(), llvm::Value::getType(), llvm::Type::isVectorTy(), and llvm::Value::replaceAllUsesWith().

◆ expectedToErrorOr()

template<typename T >
ErrorOr< T > llvm::expectedToErrorOr ( Expected< T > &&  E)

Convert an Expected<T> to an ErrorOr<T>.

Definition at line 1110 of file Error.h.

References errorToErrorCode().

◆ extractCallocCall() [1/2]

const CallInst * llvm::extractCallocCall ( const Value I,
const TargetLibraryInfo TLI 
)

extractCallocCall - Returns the corresponding CallInst if the instruction is a calloc call.

Definition at line 369 of file MemoryBuiltins.cpp.

References I, and isCallocLikeFn().

Referenced by extractCallocCall().

◆ extractCallocCall() [2/2]

CallInst * llvm::extractCallocCall ( Value I,
const TargetLibraryInfo TLI 
)
inline

Definition at line 138 of file MemoryBuiltins.h.

References extractCallocCall(), and I.

◆ extractMallocCall() [1/2]

const CallInst * llvm::extractMallocCall ( const Value I,
const TargetLibraryInfo TLI 
)

extractMallocCall - Returns the corresponding CallInst if the instruction is a malloc call.

Since CallInst::CreateMalloc() only creates calls, we ignore InvokeInst here.

Definition at line 282 of file MemoryBuiltins.cpp.

References I, and isMallocLikeFn().

Referenced by extractMallocCall(), and optimizeOnceStoredGlobal().

◆ extractMallocCall() [2/2]

CallInst * llvm::extractMallocCall ( Value I,
const TargetLibraryInfo TLI 
)
inline

Definition at line 104 of file MemoryBuiltins.h.

References extractMallocCall(), and I.

◆ fdbgs()

formatted_raw_ostream & llvm::fdbgs ( )

fdbgs() - This returns a reference to a formatted_raw_ostream for debug output.

fdbgs() - This returns a reference to a formatted_raw_ostream for the debug stream.

Use it like: fdbgs() << "foo" << "bar";

Definition at line 104 of file FormattedStream.cpp.

References dbgs().

◆ ferrs()

formatted_raw_ostream & llvm::ferrs ( )

ferrs() - This returns a reference to a formatted_raw_ostream for standard error.

Use it like: ferrs() << "foo" << "bar";

Definition at line 97 of file FormattedStream.cpp.

References errs().

◆ filterDeadComdatFunctions()

void llvm::filterDeadComdatFunctions ( Module M,
SmallVectorImpl< Function * > &  DeadComdatFunctions 
)

Filter out potentially dead comdat functions where other entries keep the entire comdat group alive.

This is designed for cases where functions appear to become dead but remain alive due to other live entries in their comdat group.

The DeadComdatFunctions container should only have pointers to Functions which are members of a comdat group and are believed to be dead.

After this routine finishes, the only remaining Functions in DeadComdatFunctions are those where every member of the comdat is listed and thus removing them is safe (provided all are removed).

Definition at line 188 of file ModuleUtils.cpp.

References assert(), F, and llvm::GlobalValue::getComdat().

Referenced by llvm::LegacyInlinerBase::removeDeadFunctions(), and llvm::AlwaysInlinerPass::run().

◆ findAllocaForValue()

AllocaInst * llvm::findAllocaForValue ( Value V,
DenseMap< Value *, AllocaInst * > &  AllocaForValue 
)

Finds alloca where the value comes from.

◆ FindAvailableLoadedValue()

Value * llvm::FindAvailableLoadedValue ( LoadInst Load,
BasicBlock ScanBB,
BasicBlock::iterator ScanFrom,
unsigned  MaxInstsToScan = DefMaxInstsToScan,
AliasAnalysis AA = nullptr,
bool IsLoadCSE = nullptr,
unsigned NumScanedInst = nullptr 
)

Scan backwards to see if we have the value of the given load available locally within a small number of instructions.

You can use this function to scan across multiple blocks: after you call this function, if ScanFrom points at the beginning of the block, it's safe to continue scanning the predecessors.

Note that performing load CSE requires special care to make sure the metadata is set appropriately. In particular, aliasing metadata needs to be merged. (This doesn't matter for store-to-load forwarding because the only relevant load gets deleted.)

Parameters
LoadThe load we want to replace.
ScanBBThe basic block to scan.
[in,out]ScanFromThe location to start scanning from. When this function returns, it points at the last instruction scanned.
MaxInstsToScanThe maximum number of instructions to scan. If this is zero, the whole block will be scanned.
AAOptional pointer to alias analysis, to make the scan more precise.
[out]IsLoadCSEWhether the returned value is a load from the same location in memory, as opposed to the value operand of a store.
Returns
The found value, or nullptr if no value is found.

Definition at line 337 of file Loads.cpp.

References FindAvailablePtrLoadStore(), llvm::LoadInst::getPointerOperand(), llvm::Value::getType(), llvm::Instruction::isAtomic(), and llvm::LoadInst::isUnordered().

Referenced by llvm::JumpThreadingPass::SimplifyPartiallyRedundantLoad(), and llvm::InstCombiner::visitLoadInst().

◆ FindAvailablePtrLoadStore()

Value * llvm::FindAvailablePtrLoadStore ( Value Ptr,
Type AccessTy,
bool  AtLeastAtomic,
BasicBlock ScanBB,
BasicBlock::iterator ScanFrom,
unsigned  MaxInstsToScan,
AliasAnalysis AA,
bool IsLoad,
unsigned NumScanedInst 
)

Scan backwards to see if we have the value of the given pointer available locally within a small number of instructions.

You can use this function to scan across multiple blocks: after you call this function, if ScanFrom points at the beginning of the block, it's safe to continue scanning the predecessors.

Parameters
PtrThe pointer we want the load and store to originate from.
AccessTyThe access type of the pointer.
AtLeastAtomicAre we looking for at-least an atomic load/store ? In case it is false, we can return an atomic or non-atomic load or store. In case it is true, we need to return an atomic load or store.
ScanBBThe basic block to scan.
[in,out]ScanFromThe location to start scanning from. When this function returns, it points at the last instruction scanned.
MaxInstsToScanThe maximum number of instructions to scan. If this is zero, the whole block will be scanned.
AAOptional pointer to alias analysis, to make the scan more precise.
[out]IsLoadWhether the returned value is a load from the same location in memory, as opposed to the value operand of a store.
Returns
The found value, or nullptr if no value is found.

Definition at line 352 of file Loads.cpp.

References AreEquivalentAddressValues(), llvm::BasicBlock::begin(), llvm::Module::getDataLayout(), llvm::AAResults::getModRefInfo(), llvm::BasicBlock::getModule(), llvm::DataLayout::getTypeStoreSize(), llvm::CastInst::isBitOrNoopPointerCastable(), isModSet(), llvm::Instruction::mayWriteToMemory(), llvm::LocationSize::precise(), and llvm::Value::stripPointerCasts().

Referenced by FindAvailableLoadedValue(), and llvm::JumpThreadingPass::SimplifyPartiallyRedundantLoad().

◆ FindDbgAddrUses()

TinyPtrVector< DbgVariableIntrinsic * > llvm::FindDbgAddrUses ( Value V)

Finds all intrinsics declaring local variables as living in the memory that 'V' points to.

This may include a mix of dbg.declare and dbg.addr intrinsics.

Definition at line 1506 of file Local.cpp.

References llvm::Value::getContext(), llvm::MetadataAsValue::getIfExists(), llvm::LocalAsMetadata::getIfExists(), llvm::Value::isUsedByMetadata(), and llvm::Value::users().

Referenced by replaceDbgDeclare(), and llvm::InstCombiner::visitAllocSite().

◆ findDbgUsers()

void llvm::findDbgUsers ( SmallVectorImpl< DbgVariableIntrinsic * > &  DbgInsts,
Value V 
)

◆ findDbgValues()

void llvm::findDbgValues ( SmallVectorImpl< DbgValueInst * > &  DbgValues,
Value V 
)

◆ findDefsUsedOutsideOfLoop()

SmallVector< Instruction *, 8 > llvm::findDefsUsedOutsideOfLoop ( Loop L)

Returns the instructions that use values defined in the loop.

Definition at line 118 of file LoopUtils.cpp.

References llvm::LoopBase< BlockT, LoopT >::contains(), llvm::LoopBase< BlockT, LoopT >::getBlocks(), and Users.

Referenced by llvm::LoopVersioning::versionLoop().

◆ findDevirtualizableCallsForTypeCheckedLoad()

void llvm::findDevirtualizableCallsForTypeCheckedLoad ( SmallVectorImpl< DevirtCallSite > &  DevirtCalls,
SmallVectorImpl< Instruction * > &  LoadedPtrs,
SmallVectorImpl< Instruction * > &  Preds,
bool HasNonCallUses,
const CallInst CI,
DominatorTree DT 
)

Given a call to the intrinsic @llvm.type.checked.load, find all devirtualizable call sites based on the call and return them in DevirtCalls.

Definition at line 97 of file TypeMetadataUtils.cpp.

References assert(), findCallsAtConstantOffset(), llvm::CallBase::getArgOperand(), llvm::CallBase::getCalledFunction(), llvm::Function::getIntrinsicID(), and llvm::Value::uses().

Referenced by addIntrinsicToSummary().

◆ findDevirtualizableCallsForTypeTest()

void llvm::findDevirtualizableCallsForTypeTest ( SmallVectorImpl< DevirtCallSite > &  DevirtCalls,
SmallVectorImpl< CallInst * > &  Assumes,
const CallInst CI,
DominatorTree DT 
)

Given a call to the intrinsic @llvm.type.test, find all devirtualizable call sites based on the call and return them in DevirtCalls.

Definition at line 73 of file TypeMetadataUtils.cpp.

References assert(), F, findLoadCallsAtConstantOffset(), llvm::CallBase::getArgOperand(), llvm::CallBase::getCalledFunction(), llvm::Function::getIntrinsicID(), llvm::GlobalValue::getParent(), llvm::BasicBlock::getParent(), llvm::Instruction::getParent(), llvm::Value::stripPointerCasts(), and llvm::Value::uses().

Referenced by addIntrinsicToSummary().

◆ findFirstSet()

template<typename T >
T llvm::findFirstSet ( Val,
ZeroBehavior  ZB = ZB_Max 
)

Get the index of the first set bit starting from the least significant bit.

Only unsigned integral types are allowed.

Parameters
ZBthe behavior on an input of 0. Only ZB_Max and ZB_Undefined are valid arguments.

Definition at line 202 of file MathExtras.h.

References countTrailingZeros(), ZB_Max, and ZB_Undefined.

Referenced by partLSB().

◆ FindFunctionBackedges()

void llvm::FindFunctionBackedges ( const Function F,
SmallVectorImpl< std::pair< const BasicBlock *, const BasicBlock * > > &  Result 
)

Analyze the specified function to find all of the loop backedges in the function and return them.

FindFunctionBackedges - Analyze the specified function to find all of the loop backedges in the function and return them.

This is a relatively cheap (compared to computing dominators and loop info) analysis.

The output is added to Result, as pairs of <from,to> edge info.

Definition at line 27 of file CFG.cpp.

References F, I, succ_begin(), succ_empty(), and succ_end().

Referenced by llvm::JumpThreadingPass::FindLoopHeaders(), and iterativelySimplifyCFG().

◆ findIndirectCalls()

std::vector< Instruction * > llvm::findIndirectCalls ( Function F)
inline

◆ FindInsertedValue()

Value * llvm::FindInsertedValue ( Value V,
ArrayRef< unsigned idx_range,
Instruction InsertBefore = nullptr 
)

Given an aggregrate and an sequence of indices, see if the scalar value indexed is already around as a register, for example if it were inserted directly into the aggregrate.

Given an aggregate and a sequence of indices, see if the scalar value indexed is already around as a register, for example if it was inserted directly into the aggregate.

If InsertBefore is not null, this function will duplicate (modified) insertvalues when a part of a nested struct is extracted.

Definition at line 3360 of file ValueTracking.cpp.

References assert(), BuildSubAggregate(), FindInsertedValue(), llvm::ExtractValueInst::getIndexedType(), llvm::Value::getType(), I, llvm::Type::isArrayTy(), and llvm::Type::isStructTy().

Referenced by BuildSubAggregate(), FindInsertedValue(), and PropagateConstantReturn().

◆ findLastSet()

template<typename T >
T llvm::findLastSet ( Val,
ZeroBehavior  ZB = ZB_Max 
)

Get the index of the last set bit starting from the least significant bit.

Only unsigned integral types are allowed.

Parameters
ZBthe behavior on an input of 0. Only ZB_Max and ZB_Undefined are valid arguments.

Definition at line 243 of file MathExtras.h.

References countLeadingZeros(), ZB_Max, and ZB_Undefined.

Referenced by partMSB().

◆ findMaximalSubpartOfIllFormedUTF8Sequence()

static unsigned llvm::findMaximalSubpartOfIllFormedUTF8Sequence ( const UTF8 source,
const UTF8 sourceEnd 
)
static

Definition at line 423 of file ConvertUTF.cpp.

References assert(), and isLegalUTF8Sequence().

Referenced by ConvertUTF8toUTF32Impl().

◆ findOptionMDForLoop()

MDNode * llvm::findOptionMDForLoop ( const Loop TheLoop,
StringRef  Name 
)

Find string metadata for a loop.

Returns the MDNode where the first operand is the metadata's name. The following operands are the metadata's values. If no metadata with Name is found, return nullptr.

Definition at line 963 of file LoopInfo.cpp.

References findOptionMDForLoopID(), and llvm::Loop::getLoopID().

Referenced by findStringMetadataForLoop(), getOptionalBoolLoopAttribute(), and llvm::Loop::isAnnotatedParallel().

◆ findOptionMDForLoopID()

MDNode * llvm::findOptionMDForLoopID ( MDNode LoopID,
StringRef  Name 
)

Find and return the loop attribute node for the attribute Name in LoopID.

Return nullptr if there is no such attribute.

Definition at line 937 of file LoopInfo.cpp.

References assert(), llvm::MDNode::getNumOperands(), llvm::MDNode::getOperand(), and llvm::MDString::getString().

Referenced by findOptionMDForLoop(), and makeFollowupLoopID().

◆ findScalarElement()

Value * llvm::findScalarElement ( Value V,
unsigned  EltNo 
)

Given a vector and an element number, see if the scalar value is already around as a register, for example if it were inserted then extracted from the vector.

Definition at line 259 of file VectorUtils.cpp.

References assert(), findScalarElement(), llvm::UndefValue::get(), llvm::SequentialType::getElementType(), llvm::SequentialType::getNumElements(), llvm::Value::getType(), llvm::Type::isVectorTy(), llvm::PatternMatch::m_Add(), llvm::PatternMatch::m_Constant(), llvm::PatternMatch::m_Value(), and llvm::PatternMatch::match().

Referenced by findScalarElement(), foldBitcastExtElt(), and SimplifyExtractElementInst().

◆ findStringMetadataForLoop()

Optional< const MDOperand * > llvm::findStringMetadataForLoop ( const Loop TheLoop,
StringRef  Name 
)

Find string metadata for loop.

If it has a value (e.g. {"llvm.distribute", 1} return the value as an operand or null otherwise. If the string metadata is not found return Optional's not-a-value.

Definition at line 199 of file LoopUtils.cpp.

References findOptionMDForLoop(), llvm::MDNode::getNumOperands(), llvm::MDNode::getOperand(), llvm_unreachable, and None.

Referenced by getOptionalIntLoopAttribute().

◆ FlattenCFG()

bool llvm::FlattenCFG ( BasicBlock BB,
AliasAnalysis AA = nullptr 
)

This function is used to flatten a CFG.

FlattenCFG - This function is used to flatten a CFG.

For example, it uses parallel-and and parallel-or mode to collapse if-conditions and merge if-regions with identical statements.

Definition at line 489 of file FlattenCFG.cpp.

Referenced by iterativelyFlattenCFG().

◆ FloatToBits()

uint32_t llvm::FloatToBits ( float  Float)
inline

This function takes a float and returns the bit equivalent 32-bit integer.

Note that copying floats around changes the bits of NaNs on some hosts, notably x86, so this routine cannot be used if these bits are needed.

Definition at line 605 of file MathExtras.h.

Referenced by llvm::support::endian::write< float >().

◆ fmt_align()

template<typename T >
detail::AlignAdapter< T > llvm::fmt_align ( T &&  Item,
AlignStyle  Where,
size_t  Amount,
char  Fill = ' ' 
)

Definition at line 85 of file FormatAdapters.h.

◆ fmt_consume()

detail::ErrorAdapter llvm::fmt_consume ( Error &&  Item)
inline

Definition at line 103 of file FormatAdapters.h.

◆ fmt_pad()

template<typename T >
detail::PadAdapter< T > llvm::fmt_pad ( T &&  Item,
size_t  Left,
size_t  Right 
)

Definition at line 91 of file FormatAdapters.h.

References Left, and Right.

◆ fmt_repeat()

template<typename T >
detail::RepeatAdapter< T > llvm::fmt_repeat ( T &&  Item,
size_t  Count 
)

Definition at line 96 of file FormatAdapters.h.

◆ FoldBranchToCommonDest()

bool llvm::FoldBranchToCommonDest ( BranchInst BI,
MemorySSAUpdater MSSAU = nullptr,
unsigned  BonusInstThreshold = 1 
)

If this basic block is ONLY a setcc and a branch, and if a predecessor branches to us and one of our successors, fold the setcc into the predecessor and use logical operations to pick the right destination.

If this basic block is simple enough, and if a predecessor branches to us and one of our successors, fold the block into the predecessor and use logical operations to pick the right destination.

Definition at line 2540 of file SimplifyCFG.cpp.

References AddPredecessorToBlock(), assert(), llvm::BasicBlock::begin(), llvm::MemorySSAUpdater::changeCondBranchToUnconditionalTo(), llvm::Instruction::clone(), llvm::BranchInst::Create(), llvm::IRBuilder< T, Inserter >::CreateBinOp(), llvm::IRBuilder< T, Inserter >::CreateNot(), dbgs(), llvm::Instruction::dropUnknownNonDebugMetadata(), EraseTerminatorAndDCECond(), extractPredSuccWeights(), FitWeights(), llvm::BranchInst::getCondition(), llvm::BasicBlock::getInstList(), llvm::CmpInst::getInversePredicate(), llvm::Instruction::getMetadata(), llvm::Value::getName(), llvm::Instruction::getParent(), llvm::BasicBlock::getSinglePredecessor(), llvm::BranchInst::getSuccessor(), llvm::BasicBlock::getTerminator(), llvm::ConstantInt::getType(), llvm::Value::hasOneUse(), I, llvm::BasicBlock::instructionsWithoutDebug(), llvm::BranchInst::isConditional(), llvm::Type::isIntegerTy(), llvm::ConstantInt::isOne(), isProfitableToFoldUnconditional(), isSafeToSpeculativelyExecute(), llvm::BranchInst::isUnconditional(), LLVM_DEBUG, llvm::LLVMContext::MD_loop, llvm::LLVMContext::MD_prof, pred_begin(), pred_end(), pred_size(), RemapInstruction(), RF_IgnoreMissingLocals, RF_NoModuleLevelChanges, SafeToMergeTerminators(), setBranchWeights(), llvm::BranchInst::setCondition(), llvm::Instruction::setMetadata(), llvm::CmpInst::setPredicate(), llvm::BranchInst::setSuccessor(), llvm::BranchInst::swapSuccessors(), llvm::Value::takeName(), and tryCSEWithPredecessor().

Referenced by simplifyOneLoop().

◆ FoldReturnIntoUncondBranch()

ReturnInst * llvm::FoldReturnIntoUncondBranch ( ReturnInst RI,
BasicBlock BB,
BasicBlock Pred,
DomTreeUpdater DTU = nullptr 
)

This method duplicates the specified return instruction into a predecessor which ends in an unconditional branch.

If the return instruction returns a value defined by a PHI, propagate the right value into the return. It returns the new return instruction in the predecessor.

Definition at line 729 of file BasicBlockUtils.cpp.

References llvm::DomTreeUpdater::applyUpdates(), llvm::Instruction::clone(), llvm::Instruction::eraseFromParent(), llvm::BasicBlock::getInstList(), llvm::BasicBlock::getTerminator(), llvm::User::op_begin(), llvm::User::op_end(), llvm::BasicBlock::removePredecessor(), and llvm::User::setOperand().

Referenced by foldReturnAndProcessPred().

◆ FoldSingleEntryPHINodes()

void llvm::FoldSingleEntryPHINodes ( BasicBlock BB,
MemoryDependenceResults MemDep = nullptr 
)

We know that BB has one predecessor.

If there are any single-entry PHI nodes in it, fold them away. This handles the case when all entries to the PHI nodes in a block are guaranteed equal, such as when the block has exactly one predecessor.

Definition at line 139 of file BasicBlockUtils.cpp.

References llvm::BasicBlock::begin(), llvm::UndefValue::get(), and llvm::MemoryDependenceResults::removeInstruction().

Referenced by FoldCondBranchOnPHI(), MergeBlockIntoPredecessor(), normalizeForInvokeSafepoint(), and llvm::RewriteStatepointsForGC::runOnFunction().

◆ forcePrintModuleIR()

bool llvm::forcePrintModuleIR ( )

forcePrintModuleIR - returns true if IR printing passes should

Definition at line 130 of file LegacyPassManager.cpp.

References PrintModuleScope.

Referenced by printLoop(), llvm::PrintIRInstrumentation::registerCallbacks(), and llvm::PrintFunctionPass::run().

◆ format()

template<typename... Ts>
format_object< Ts... > llvm::format ( const char Fmt,
const Ts &...  Vals 
)
inline

These are helper functions used to produce formatted output.

They use template type deduction to construct the appropriate instance of the format_object class to simplify their construction.

This is typically used like:

OS << format("%0.4f", myfloat) << '\n';
format_object< Ts... > format(const char *Fmt, const Ts &... Vals)
These are helper functions used to produce formatted output.
Definition: Format.h:123

Definition at line 123 of file Format.h.

Referenced by createStringError(), llvm::MD5::MD5Result::digest(), llvm::DWARFDebugAbbrev::dump(), llvm::DWARFDebugArangeSet::dump(), llvm::DWARFDebugLine::Row::dump(), llvm::DWARFDebugPubTable::dump(), llvm::DWARFDebugRangeList::dump(), llvm::DWARFUnitIndex::dump(), llvm::DWARFDebugLoc::LocationList::dump(), llvm::dwarf::CIE::dump(), llvm::dwarf::FDE::dump(), llvm::DWARFDebugLoc::dump(), llvm::DWARFDebugLine::Prologue::dump(), llvm::DWARFCompileUnit::dump(), llvm::DWARFContext::dump(), llvm::DWARFFormValue::dump(), llvm::DWARFDebugAddrTable::dump(), llvm::DWARFListTableHeader::dump(), llvm::DWARFTypeUnit::dump(), llvm::DWARFDebugArangeSet::Descriptor::dump(), llvm::DWARFAddressRange::dump(), llvm::DWARFDebugLoclists::LocationList::dump(), llvm::DWARFDebugLoclists::dump(), llvm::RangeListEntry::dump(), llvm::DWARFDie::dump(), llvm::DWARFFormValue::dumpAddressSection(), dumpApplePropertyAttribute(), dumpAttribute(), dumpDWARFv5StringOffsetsSection(), llvm::DWARFFormValue::dumpSectionedAddress(), dumpStringOffsetsSection(), llvm::BFIDOTGraphTraitsBase< BlockFrequencyInfoT, BranchProbabilityInfoT >::getEdgeAttributes(), llvm::gsym::operator<<(), operator<<(), llvm::DWARFDebugLine::LineTable::parse(), prettyPrintRegisterOp(), llvm::TimeRecord::print(), llvm::BranchProbability::print(), llvm::DWARFExpression::Operation::print(), llvm::DWARFExpression::print(), printVal(), ReportError(), llvm::json::OStream::value(), write_double(), and llvm::raw_ostream::write_uuid().

◆ format_bytes()

FormattedBytes llvm::format_bytes ( ArrayRef< uint8_t >  Bytes,
Optional< uint64_t >  FirstByteOffset = None,
uint32_t  NumPerLine = 16,
uint8_t  ByteGroupSize = 4,
uint32_t  IndentLevel = 0,
bool  Upper = false 
)
inline

Definition at line 238 of file Format.h.

References Upper.

◆ format_bytes_with_ascii()

FormattedBytes llvm::format_bytes_with_ascii ( ArrayRef< uint8_t >  Bytes,
Optional< uint64_t >  FirstByteOffset = None,
uint32_t  NumPerLine = 16,
uint8_t  ByteGroupSize = 4,
uint32_t  IndentLevel = 0,
bool  Upper = false 
)
inline

Definition at line 246 of file Format.h.

References Upper.

◆ format_decimal()

FormattedNumber llvm::format_decimal ( int64_t  N,
unsigned  Width 
)
inline

format_decimal - Output N as a right justified, fixed-width decimal.

If number will not fit in width, full number is still printed. Examples: OS << format_decimal(0, 5) => " 0" OS << format_decimal(255, 5) => " 255" OS << format_decimal(-1, 3) => " -1" OS << format_decimal(12345, 3) => "12345"

Definition at line 210 of file Format.h.

References N.

◆ format_hex()

FormattedNumber llvm::format_hex ( uint64_t  N,
unsigned  Width,
bool  Upper = false 
)
inline

format_hex - Output N as a fixed width hexadecimal.

If number will not fit in width, full number is still printed. Examples: OS << format_hex(255, 4) => 0xff OS << format_hex(255, 4, true) => 0xFF OS << format_hex(255, 6) => 0x00ff OS << format_hex(255, 2) => 0xff

Definition at line 185 of file Format.h.

References assert(), N, and Upper.

Referenced by ErrorFromHResult(), format_ptr(), printSymbolizedStackTrace(), and WriteConstantInternal().

◆ format_hex_no_prefix()

FormattedNumber llvm::format_hex_no_prefix ( uint64_t  N,
unsigned  Width,
bool  Upper = false 
)
inline

format_hex_no_prefix - Output N as a fixed width hexadecimal.

Does not prepend '0x' to the outputted string. If number will not fit in width, full number is still printed. Examples: OS << format_hex_no_prefix(255, 2) => ff OS << format_hex_no_prefix(255, 2, true) => FF OS << format_hex_no_prefix(255, 4) => 00ff OS << format_hex_no_prefix(255, 1) => ff

Definition at line 198 of file Format.h.

References assert(), N, and Upper.

Referenced by llvm::pdb::IPDBSourceFile::dump(), to_hexString(), and WriteConstantInternal().

◆ formatv()

template<typename... Ts>
auto llvm::formatv ( const char Fmt,
Ts &&...  Vals 
) -> formatv_object<decltype( std::make_tuple(detail::build_format_adapter(std::forward<Ts>(Vals))...))>
inline

◆ formDedicatedExitBlocks()

bool llvm::formDedicatedExitBlocks ( Loop L,
DominatorTree DT,
LoopInfo LI,
MemorySSAUpdater MSSAU,
bool  PreserveLCSSA 
)

Ensure that all exit blocks of the loop are dedicated exits.

For any loop exit block with non-loop predecessors, we split the loop predecessors to use a dedicated loop exit block. We update the dominator tree and loop info if provided, and will preserve LCSSA if requested.

Definition at line 49 of file LoopUtils.cpp.

References assert(), llvm::LoopBase< BlockT, LoopT >::blocks(), llvm::LoopBase< BlockT, LoopT >::contains(), dbgs(), LLVM_DEBUG, predecessors(), SplitBlockPredecessors(), and successors().

Referenced by hoistLoopToNewParent(), separateNestedLoop(), simplifyOneLoop(), UnrollRuntimeLoopRemainder(), and unswitchNontrivialInvariants().

◆ formLCSSA()

bool llvm::formLCSSA ( Loop L,
DominatorTree DT,
LoopInfo LI,
ScalarEvolution SE 
)

Put loop into LCSSA form.

Looks at all instructions in the loop which have uses outside of the current loop. For each, an LCSSA PHI node is inserted and the uses outside the loop are rewritten to use this node. Sub-loops must be in LCSSA form already.

LoopInfo and DominatorTree are required and preserved.

If ScalarEvolution is passed in, it will be preserved.

Returns true if any modifications are made to the loop.

Definition at line 320 of file LCSSA.cpp.

References assert(), computeBlocksDominatingExits(), llvm::ScalarEvolution::forgetLoop(), formLCSSAForInstructions(), llvm::LoopBase< BlockT, LoopT >::getExitBlocks(), llvm::LoopInfoBase< BlockT, LoopT >::getLoopFor(), I, and llvm::Loop::isLCSSAForm().

Referenced by formLCSSARecursively(), hoistLoopToNewParent(), separateNestedLoop(), and unswitchNontrivialInvariants().

◆ formLCSSAForInstructions()

bool llvm::formLCSSAForInstructions ( SmallVectorImpl< Instruction * > &  Worklist,
DominatorTree DT,
LoopInfo LI 
)

Ensures LCSSA form for every instruction from the Worklist in the scope of innermost containing loop.

For every instruction from the worklist, check to see if it has any uses that are outside the current loop.

For the given instruction which have uses outside of the loop, an LCSSA PHI node is inserted and the uses outside the loop are rewritten to use this node.

LoopInfo and DominatorTree are required and, since the routine makes no changes to CFG, preserved.

Returns true if any modifications are made.

If so, insert LCSSA PHI nodes and rewrite the uses.

Definition at line 76 of file LCSSA.cpp.

References llvm::SSAUpdater::AddAvailableValue(), llvm::PHINode::addIncoming(), assert(), llvm::BasicBlock::begin(), llvm::LoopBase< BlockT, LoopT >::contains(), llvm::PHINode::Create(), llvm::DominatorTree::dominates(), findDbgValues(), llvm::SSAUpdater::FindValueForBlock(), llvm::BasicBlock::front(), llvm::PredIteratorCache::get(), llvm::MetadataAsValue::get(), llvm::ValueAsMetadata::get(), llvm::LoopBase< BlockT, LoopT >::getExitBlocks(), llvm::LoopInfoBase< BlockT, LoopT >::getLoopFor(), llvm::DominatorTreeBase< NodeT, IsPostDom >::getNode(), llvm::PHINode::getNumIncomingValues(), llvm::PHINode::getOperandNumForIncomingValue(), llvm::User::getOperandUse(), llvm::BasicBlock::getParent(), llvm::SSAUpdater::HasValueForBlock(), I, llvm::SSAUpdater::Initialize(), insertDebugValuesForPHIs(), isExitBlock(), llvm::SSAUpdater::RewriteUse(), llvm::Instruction::setDebugLoc(), llvm::PredIteratorCache::size(), and llvm::ValueHandleBase::ValueIsRAUWd().

Referenced by formLCSSA().

◆ formLCSSARecursively()

bool llvm::formLCSSARecursively ( Loop L,
DominatorTree DT,
LoopInfo LI,
ScalarEvolution SE 
)

Put a loop nest into LCSSA form.

Process a loop nest depth first.

This recursively forms LCSSA for a loop nest.

LoopInfo and DominatorTree are required and preserved.

If ScalarEvolution is passed in, it will be preserved.

Returns true if any modifications are made to the loop.

Definition at line 385 of file LCSSA.cpp.

References formLCSSA(), formLCSSARecursively(), and llvm::LoopBase< BlockT, LoopT >::getSubLoops().

Referenced by formLCSSAOnAllLoops(), formLCSSARecursively(), llvm::LoopUnrollPass::run(), llvm::LoopVectorizePass::runImpl(), and UnrollLoop().

◆ fouts()

formatted_raw_ostream & llvm::fouts ( )

fouts() - This returns a reference to a formatted_raw_ostream for standard output.

Use it like: fouts() << "foo" << "bar";

Definition at line 90 of file FormattedStream.cpp.

References outs().

◆ gatherImportedSummariesForModule()

void llvm::gatherImportedSummariesForModule ( StringRef  ModulePath,
const StringMap< GVSummaryMapTy > &  ModuleToDefinedGVSummaries,
const FunctionImporter::ImportMapTy ImportList,
std::map< std::string, GVSummaryMapTy > &  ModuleToSummariesForIndex 
)

Compute the set of summaries needed for a ThinLTO backend compilation of ModulePath.

This includes summaries from that module (in case any global summary based optimizations were recorded) and from any definitions in other modules that should be imported. ModuleToSummariesForIndex will be populated with the needed summaries from each required module path. Use a std::map instead of StringMap to get stable order for bitcode emission.

Definition at line 868 of file FunctionImport.cpp.

References assert().

Referenced by llvm::ThinLTOCodeGenerator::emitImports(), and llvm::ThinLTOCodeGenerator::gatherImportedSummariesForModule().

◆ gatherUnrollingPreferences()

TargetTransformInfo::UnrollingPreferences llvm::gatherUnrollingPreferences ( Loop L,
ScalarEvolution SE,
const TargetTransformInfo TTI,
BlockFrequencyInfo BFI,
ProfileSummaryInfo PSI,
int  OptLevel,
Optional< unsigned UserThreshold,
Optional< unsigned UserCount,
Optional< bool UserAllowPartial,
Optional< bool UserRuntime,
Optional< bool UserUpperBound,
Optional< bool UserAllowPeeling 
)

Gather the various unrolling parameters based on the defaults, compiler flags, TTI overrides and user specified parameters.

Definition at line 176 of file LoopUnrollPass.cpp.

References llvm::TargetTransformInfo::UnrollingPreferences::AllowExpensiveTripCount, llvm::TargetTransformInfo::UnrollingPreferences::AllowPeeling, llvm::TargetTransformInfo::UnrollingPreferences::AllowRemainder, llvm::TargetTransformInfo::UnrollingPreferences::BEInsns, llvm::TargetTransformInfo::UnrollingPreferences::Count, llvm::TargetTransformInfo::UnrollingPreferences::DefaultUnrollRuntimeCount, llvm::TargetTransformInfo::UnrollingPreferences::Force, llvm::TargetTransformInfo::UnrollingPreferences::FullUnrollMaxCount, llvm::LoopBase< BlockT, LoopT >::getHeader(), llvm::BasicBlock::getParent(), llvm::TargetTransformInfo::getUnrollingPreferences(), llvm::Function::hasOptSize(), llvm::TargetTransformInfo::UnrollingPreferences::MaxCount, llvm::TargetTransformInfo::UnrollingPreferences::MaxPercentThresholdBoost, llvm::TargetTransformInfo::UnrollingPreferences::OptSizeThreshold, llvm::TargetTransformInfo::UnrollingPreferences::Partial, llvm::TargetTransformInfo::UnrollingPreferences::PartialOptSizeThreshold, llvm::TargetTransformInfo::UnrollingPreferences::PartialThreshold, llvm::TargetTransformInfo::UnrollingPreferences::PeelCount, llvm::TargetTransformInfo::UnrollingPreferences::Runtime, shouldOptimizeForSize(), llvm::TargetTransformInfo::UnrollingPreferences::Threshold, UnrollAllowPartial, UnrollAllowPeeling, UnrollAllowRemainder, llvm::TargetTransformInfo::UnrollingPreferences::UnrollAndJam, llvm::TargetTransformInfo::UnrollingPreferences::UnrollAndJamInnerLoopThreshold, UnrollFullMaxCount, UnrollMaxCount, UnrollMaxPercentThresholdBoost, UnrollMaxUpperBound, UnrollPartialThreshold, UnrollPeelCount, llvm::TargetTransformInfo::UnrollingPreferences::UnrollRemainder, UnrollRuntime, UnrollThreshold, UnrollUnrollRemainder, and llvm::TargetTransformInfo::UnrollingPreferences::UpperBound.

Referenced by tryToUnrollAndJamLoop(), and tryToUnrollLoop().

◆ gep_type_begin() [1/3]

gep_type_iterator llvm::gep_type_begin ( const User GEP)
inline

Definition at line 138 of file GetElementPtrTypeIterator.h.

References llvm::AliasSet::begin(), and llvm::User::op_begin().

◆ gep_type_begin() [2/3]

gep_type_iterator llvm::gep_type_begin ( const User GEP)
inline

◆ gep_type_begin() [3/3]

template<typename T >
generic_gep_type_iterator< const T * > llvm::gep_type_begin ( Type Op0,
ArrayRef< T >  A 
)
inline

Definition at line 151 of file GetElementPtrTypeIterator.h.

References llvm::AliasSet::begin().

◆ gep_type_end() [1/3]

gep_type_iterator llvm::gep_type_end ( const User GEP)
inline

Definition at line 145 of file GetElementPtrTypeIterator.h.

References parse::end, and llvm::User::op_end().

◆ gep_type_end() [2/3]

gep_type_iterator llvm::gep_type_end ( const User GEP)
inline

◆ gep_type_end() [3/3]

template<typename T >
generic_gep_type_iterator< const T * > llvm::gep_type_end ( Type ,
ArrayRef< T >  A 
)
inline

Definition at line 157 of file GetElementPtrTypeIterator.h.

References parse::end.

◆ get_hashable_data()

static const Metadata * llvm::get_hashable_data ( const MDOperand X)
static

Make MDOperand transparent for hashing.

This overload of an implementation detail of the hashing library makes MDOperand hash to the same value as a Metadata pointer.

Note that overloading hash_value() as follows:

size_t hash_value(const MDOperand &X) { return hash_value(X.get()); }
Tracking metadata reference owned by Metadata.
Definition: Metadata.h:710
hash_code hash_value(const APFloat &Arg)
Definition: APFloat.cpp:4470

does not cause MDOperand to be transparent. In particular, a bare pointer doesn't get hashed before it's combined, whereas MDOperand would.

Definition at line 178 of file LLVMContextImpl.cpp.

References X().

◆ get_max_thread_name_length()

uint32_t llvm::get_max_thread_name_length ( )

Get the maximum length of a thread name on this platform.

A value of 0 means there is no limit.

◆ get_thread_name()

void llvm::get_thread_name ( SmallVectorImpl< char > &  Name)

Get the name of the current thread.

The level of support for getting a thread's name varies wildly across operating systems, and it is not even guaranteed that if you can successfully set a thread's name that you can later get it back. This function is intended for diagnostic purposes, and as with setting a thread's name no indication of whether the operation succeeded or failed is returned.

◆ get_threadid()

uint64_t llvm::get_threadid ( )

Return the current thread id, as used in various OS system calls.

Note that not all platforms guarantee that the value returned will be unique across the entire system, so portable code should not assume this.

◆ getAAResultsAnalysisUsage()

void llvm::getAAResultsAnalysisUsage ( AnalysisUsage &  AU)

A helper for the legacy pass manager to populate AU to add uses to make sure the analyses required by createLegacyPMAAResults are available.

Definition at line 896 of file AliasAnalysis.cpp.

Referenced by llvm::LegacyInlinerBase::getAnalysisUsage().

◆ getArgumentAliasingToReturnedPointer() [1/2]

Value * llvm::getArgumentAliasingToReturnedPointer ( CallBase Call)
inline

Definition at line 312 of file ValueTracking.h.

References getArgumentAliasingToReturnedPointer().

◆ getArgumentAliasingToReturnedPointer() [2/2]

const Value * llvm::getArgumentAliasingToReturnedPointer ( const CallBase Call)

This function returns call pointer argument that is considered the same by aliasing rules.

You CAN'T use it to replace one value with another.

Definition at line 3654 of file ValueTracking.cpp.

References assert(), and isIntrinsicReturningPointerAliasingArgumentWithoutCapturing().

Referenced by getArgumentAliasingToReturnedPointer(), GetUnderlyingObject(), isDereferenceableAndAlignedPointer(), and isKnownNonZero().

◆ getBestSimplifyQuery() [1/4]

template const SimplifyQuery llvm::getBestSimplifyQuery ( AnalysisManager< Function > &  ,
Function  
)

◆ getBestSimplifyQuery() [2/4]

template<class T , class... TArgs>
const SimplifyQuery llvm::getBestSimplifyQuery ( AnalysisManager< T, TArgs... > &  AM,
Function F 
)

Definition at line 5323 of file InstructionSimplify.cpp.

References F.

◆ getBestSimplifyQuery() [3/4]

const SimplifyQuery llvm::getBestSimplifyQuery ( LoopStandardAnalysisResults AR,
const DataLayout DL 
)

◆ getBestSimplifyQuery() [4/4]

const SimplifyQuery llvm::getBestSimplifyQuery ( Pass P,
Function F 
)

◆ getCallsiteCost()

int llvm::getCallsiteCost ( CallBase Call,
const DataLayout DL 
)

Return the cost associated with a callsite, including parameter passing and the call/return instruction.

Definition at line 1981 of file InlineCost.cpp.

References llvm::InlineConstants::CallPenalty, llvm::PointerType::getAddressSpace(), llvm::PointerType::getElementType(), llvm::DataLayout::getPointerSizeInBits(), llvm::DataLayout::getTypeSizeInBits(), I, and llvm::InlineConstants::InstrCost.

◆ getComplexity()

static unsigned llvm::getComplexity ( Value V)
inlinestatic

Assign a complexity or rank value to LLVM Values.

This is used to reduce the amount of pattern matching needed for compares and commutative instructions. For example, if we have: icmp ugt X, Constant or xor (add X, Constant), cast Z

We do not have to consider the commuted variants of these patterns because canonicalization based on complexity guarantees the above ordering.

This routine maps IR values to various complexity ranks: 0 -> undef 1 -> Constants 2 -> Other non-instructions 3 -> Arguments 4 -> Cast and (f)neg/not instructions 5 -> Other instructions

Definition at line 83 of file InstCombineInternal.h.

References llvm::PatternMatch::m_FNeg(), llvm::PatternMatch::m_Neg(), llvm::PatternMatch::m_Not(), llvm::PatternMatch::m_Value(), and llvm::PatternMatch::match().

Referenced by llvm::InstCombiner::visitFCmpInst(), and llvm::InstCombiner::visitICmpInst().

◆ getConstantDataArrayInfo()

bool llvm::getConstantDataArrayInfo ( const Value V,
ConstantDataArraySlice Slice,
unsigned  ElementSize,
uint64_t  Offset = 0 
)

◆ getConstantRangeFromMetadata()

ConstantRange llvm::getConstantRangeFromMetadata ( const MDNode RangeMD)

Parse out a conservative ConstantRange from !range metadata.

E.g. if RangeMD is !{i32 0, i32 10, i32 15, i32 20} then return [0, 20).

Definition at line 1417 of file ConstantRange.cpp.

References assert(), llvm::MDNode::getNumOperands(), llvm::MDNode::getOperand(), and llvm::ConstantRange::unionWith().

Referenced by computeConstantRange(), copyRangeMetadata(), llvm::GlobalValue::getAbsoluteSymbolRange(), getFromRangeMetadata(), GetRangeFromMetadata(), getValueFromICmpCondition(), and SimplifyICmpInst().

◆ getConstantStringInfo()

bool llvm::getConstantStringInfo ( const Value V,
StringRef &  Str,
uint64_t  Offset = 0,
bool  TrimAtNul = true 
)

This function computes the length of a null-terminated C string pointed to by V.

If successful, it returns true and returns the string in Str. If unsuccessful, it returns false. This does not include the trailing null character by default. If TrimAtNul is set to false, then this returns any trailing null characters as well as any other characters that come after it.

If successful, it returns true and returns the string in Str. If unsuccessful, it returns false.

Definition at line 3542 of file ValueTracking.cpp.

References llvm::ConstantDataArraySlice::Array, llvm::ConstantDataSequential::getAsString(), getConstantDataArrayInfo(), llvm::ConstantDataArraySlice::Length, and llvm::ConstantDataArraySlice::Offset.

Referenced by ConstantFoldLoadFromConstPtr(), and optimizeMemCmpConstantSize().

◆ getCopyDeclaration()

static Function * llvm::getCopyDeclaration ( Module M,
Type Ty 
)
static

Definition at line 490 of file PredicateInfo.cpp.

◆ getDebugMetadataVersionFromModule()

unsigned llvm::getDebugMetadataVersionFromModule ( const Module M)

Return Debug Info Metadata Version by checking module flags.

Definition at line 682 of file DebugInfo.cpp.

Referenced by LLVMGetModuleDebugMetadataVersion(), and UpgradeDebugInfo().

◆ getDefaultEHPersonality()

EHPersonality llvm::getDefaultEHPersonality ( const Triple &  T)

Definition at line 65 of file EHPersonalities.cpp.

Referenced by getDefaultPersonalityFn().

◆ getDefaultPrecision()

size_t llvm::getDefaultPrecision ( FloatStyle  Style)

◆ getDescriptions()

static DescVector llvm::getDescriptions ( )
static

Definition at line 25 of file DWARFExpression.cpp.

Referenced by getOpDesc().

◆ getDISubprogram()

DISubprogram * llvm::getDISubprogram ( const MDNode Scope)

Find subprogram that is enclosing this scope.

Definition at line 43 of file DebugInfo.cpp.

References llvm::DILocalScope::getSubprogram().

Referenced by llvm::DIBuilder::createLabel(), createLocalVariable(), and llvm::DebugLoc::getFnDebugLoc().

◆ getDWARFUnitIndex()

const DWARFUnitIndex & llvm::getDWARFUnitIndex ( DWARFContext Context,
DWARFSectionKind  Kind 
)

◆ getEHPersonalityName()

StringRef llvm::getEHPersonalityName ( EHPersonality  Pers)

Definition at line 45 of file EHPersonalities.cpp.

References llvm_unreachable.

Referenced by getDefaultPersonalityFn().

◆ getGEPInductionOperand()

unsigned llvm::getGEPInductionOperand ( const GetElementPtrInst Gep)

◆ getGuaranteedNonFullPoisonOp()

const Value * llvm::getGuaranteedNonFullPoisonOp ( const Instruction I)

Return either nullptr or an operand of I such that I will trigger undefined behavior if I is executed and that operand has a full-poison value (all bits poison).

Definition at line 4348 of file ValueTracking.cpp.

References I.

Referenced by mustTriggerUB(), and rewrite().

◆ getGVDT()

static GVDAGType llvm::getGVDT ( )
static

◆ getHotnessName()

const char * llvm::getHotnessName ( CalleeInfo::HotnessType  HT)
inline

◆ getICmpCode()

unsigned llvm::getICmpCode ( const ICmpInst ICI,
bool  InvertPred = false 
)

Encode a icmp predicate into a three bit mask.

These bits are carefully arranged to allow folding of expressions such as:

 (A < B) | (A > B) --> (A != B)

Note that this is only valid if the first and second predicates have the same sign. It is illegal to do: (A u< B) | (A s> B)

Three bits are used to represent the condition, as follows: 0 A > B 1 A == B 2 A < B

<=> Value Definition 000 0 Always false 001 1 A > B 010 2 A == B 011 3 A >= B 100 4 A < B 101 5 A != B 110 6 A <= B 111 7 Always true

Definition at line 21 of file CmpInstAnalysis.cpp.

References llvm::CmpInst::getInversePredicate(), llvm::CmpInst::getPredicate(), and llvm_unreachable.

◆ GetIfCondition()

Value * llvm::GetIfCondition ( BasicBlock BB,
BasicBlock *&  IfTrue,
BasicBlock *&  IfFalse 
)

Check whether BB is the merge point of a if-region.

If so, return the boolean condition that determines which entry into BB will be taken. Also, return by references the block that will be entered from if the condition is true, and the block that will be entered if the condition is false.

This does no checking to see if the true/false blocks have large or unsavory instructions in them.

Definition at line 844 of file BasicBlockUtils.cpp.

References assert(), llvm::BasicBlock::begin(), llvm::BranchInst::getCondition(), llvm::PHINode::getIncomingBlock(), llvm::PHINode::getNumIncomingValues(), llvm::BasicBlock::getSinglePredecessor(), llvm::BranchInst::getSuccessor(), llvm::BasicBlock::getTerminator(), llvm::BranchInst::isConditional(), pred_begin(), and pred_end().

Referenced by FoldTwoEntryPHINode().

◆ getInlineCost() [1/2]

InlineCost llvm::getInlineCost ( CallBase Call,
const InlineParams Params,
TargetTransformInfo CalleeTTI,
std::function< AssumptionCache &(Function &)> &  GetAssumptionCache,
Optional< function_ref< BlockFrequencyInfo &(Function &)> >  GetBFI,
ProfileSummaryInfo PSI,
OptimizationRemarkEmitter ORE = nullptr 
)

Get an InlineCost object representing the cost of inlining this callsite.

Note that a default threshold is passed into this function. This threshold could be modified based on callsite's properties and only costs below this new threshold are computed with any accuracy. The new threshold can be used to bound the computation necessary to determine whether the cost is sufficiently low to warrant inlining.

Also note that calling this function dynamically computes the cost of inlining the callsite. It is an expensive, heavyweight call.

Definition at line 2014 of file InlineCost.cpp.

References getInlineCost().

Referenced by getInlineCost().

◆ getInlineCost() [2/2]

InlineCost llvm::getInlineCost ( CallBase Call,
Function Callee,
const InlineParams Params,
TargetTransformInfo CalleeTTI,
std::function< AssumptionCache &(Function &)> &  GetAssumptionCache,
Optional< function_ref< BlockFrequencyInfo &(Function &)> >  GetBFI,
ProfileSummaryInfo PSI,
OptimizationRemarkEmitter ORE 
)

Get an InlineCost with the callee explicitly specified.

This allows you to calculate the cost of inlining a function via a pointer. This behaves exactly as the version with no explicit callee parameter in all other respects.

Definition at line 2023 of file InlineCost.cpp.

References dbgs(), functionsHaveCompatibleAttributes(), llvm::DITypeRefArray::get(), llvm::PointerType::getAddressSpace(), llvm::InlineCost::getAlways(), llvm::InlineCost::getNever(), I, isInlineViable(), LLVM_DEBUG, llvm::InlineResult::message, and llvm::FunctionSummary::FFlags::NoInline.

◆ getInlineParams() [1/3]

InlineParams llvm::getInlineParams ( )

Generate the parameters to tune the inline cost analysis based only on the commandline options.

Definition at line 2208 of file InlineCost.cpp.

References getInlineParams(), and InlineThreshold.

Referenced by createFunctionInliningPass(), getInlineParams(), and getInlineParamsFromOptLevel().

◆ getInlineParams() [2/3]

InlineParams llvm::getInlineParams ( int  Threshold)

◆ getInlineParams() [3/3]

InlineParams llvm::getInlineParams ( unsigned  OptLevel,
unsigned  SizeOptLevel 
)

Generate the parameters to tune the inline cost analysis based on command line options.

If -inline-threshold option is not explicitly passed, the default threshold is computed from OptLevel and SizeOptLevel. An OptLevel value above 3 is considered an aggressive optimization mode. SizeOptLevel of 1 corresponds to the -Os flag and 2 corresponds to the -Oz flag.

Definition at line 2225 of file InlineCost.cpp.

References computeThresholdFromOptLevels(), getInlineParams(), llvm::InlineParams::LocallyHotCallSiteThreshold, and LocallyHotCallSiteThreshold.

◆ getIntrinsicForCallSite()

Intrinsic::ID llvm::getIntrinsicForCallSite ( ImmutableCallSite  ICS,
const TargetLibraryInfo TLI 
)

◆ getInverseMinMaxFlavor()

SelectPatternFlavor llvm::getInverseMinMaxFlavor ( SelectPatternFlavor  SPF)

Return the inverse minimum/maximum flavor of the specified flavor.

For example, signed minimum is the inverse of signed maximum.

Definition at line 5116 of file ValueTracking.cpp.

References llvm_unreachable, SPF_SMAX, SPF_SMIN, SPF_UMAX, and SPF_UMIN.

Referenced by getInverseMinMaxPred(), and isSignedMinMaxClamp().

◆ getInverseMinMaxPred()

CmpInst::Predicate llvm::getInverseMinMaxPred ( SelectPatternFlavor  SPF)

Return the canonical inverse comparison predicate for the specified minimum/maximum flavor.

Definition at line 5124 of file ValueTracking.cpp.

References getInverseMinMaxFlavor(), and getMinMaxPred().

Referenced by llvm::InstCombiner::visitXor().

◆ getKnownAlignment()

unsigned llvm::getKnownAlignment ( Value V,
const DataLayout DL,
const Instruction CxtI = nullptr,
AssumptionCache AC = nullptr,
const DominatorTree DT = nullptr 
)
inline

Try to infer an alignment for the specified pointer.

Definition at line 267 of file Local.h.

References getOrEnforceKnownAlignment().

Referenced by AddAlignmentAssumptions(), optimizeMemCmpConstantSize(), and llvm::InstCombiner::visitCallInst().

◆ getLazyIRFileModule()

std::unique_ptr< Module > llvm::getLazyIRFileModule ( StringRef  Filename,
SMDiagnostic Err,
LLVMContext Context,
bool  ShouldLazyLoadMetadata = false 
)

If the given file holds a bitcode image, return a Module for it which does lazy deserialization of function bodies.

Otherwise, attempt to parse it as LLVM Assembly and return a fully populated Module. The ShouldLazyLoadMetadata flag is passed down to the bitcode reader to optionally enable lazy metadata loading.

Definition at line 52 of file IRReader.cpp.

References llvm::SourceMgr::DK_Error, llvm::ErrorOr< T >::get(), llvm::ErrorOr< T >::getError(), llvm::MemoryBuffer::getFileOrSTDIN(), and getLazyIRModule().

Referenced by loadFile().

◆ getLazyIRModule()

std::unique_ptr< Module > llvm::getLazyIRModule ( std::unique_ptr< MemoryBuffer Buffer,
SMDiagnostic Err,
LLVMContext Context,
bool  ShouldLazyLoadMetadata = false 
)

If the given MemoryBuffer holds a bitcode image, return a Module for it which does lazy deserialization of function bodies.

Otherwise, attempt to parse it as LLVM Assembly and return a fully populated Module. The ShouldLazyLoadMetadata flag is passed down to the bitcode reader to optionally enable lazy metadata loading. This takes ownership of Buffer.

Definition at line 33 of file IRReader.cpp.

References llvm::SourceMgr::DK_Error, llvm::Expected< T >::get(), handleAllErrors(), llvm::ErrorInfoBase::message(), parseAssembly(), and llvm::Expected< T >::takeError().

Referenced by getLazyIRFileModule().

◆ getLoadStoreAddressSpace()

unsigned llvm::getLoadStoreAddressSpace ( Value I)
inline

A helper function that returns the address space of the pointer operand of load or store instruction.

Definition at line 5286 of file Instructions.h.

References assert(), and I.

Referenced by llvm::InterleavedAccessInfo::analyzeInterleaving(), llvm::InnerLoopVectorizer::vectorizeInterleaveGroup(), and llvm::InnerLoopVectorizer::vectorizeMemoryInstruction().

◆ getLoadStoreAlignment()

unsigned llvm::getLoadStoreAlignment ( Value I)
inline

A helper function that returns the alignment of load or store instruction.

Definition at line 5276 of file Instructions.h.

References assert(), and I.

Referenced by llvm::InnerLoopVectorizer::vectorizeMemoryInstruction().

◆ getLoadStorePointerOperand()

Value * llvm::getLoadStorePointerOperand ( Value V)
inline

◆ getLoopAnalysisUsage()

void llvm::getLoopAnalysisUsage ( AnalysisUsage &  AU)

Helper to consistently add the set of standard passes to a loop pass's AnalysisUsage.

All loop passes should call this as part of implementing their getAnalysisUsage.

Definition at line 136 of file LoopUtils.cpp.

References LCSSAID, and LoopSimplifyID.

◆ getLoopEstimatedTripCount()

Optional< unsigned > llvm::getLoopEstimatedTripCount ( Loop L)

◆ getLoopPassPreservedAnalyses()

PreservedAnalyses llvm::getLoopPassPreservedAnalyses ( )

◆ getMallocAllocatedType()

Type * llvm::getMallocAllocatedType ( const CallInst CI,
const TargetLibraryInfo TLI 
)

getMallocAllocatedType - Returns the Type allocated by malloc call.

The Type depends on the number of bitcast uses of the malloc call: 0: PointerType is the malloc calls' return type. 1: PointerType is the bitcast's result type. >1: Unique PointerType cannot be determined, return NULL.

Definition at line 349 of file MemoryBuiltins.cpp.

References llvm::PointerType::getElementType(), and getMallocType().

Referenced by computeArraySize(), optimizeOnceStoredGlobal(), PerformHeapAllocSRoA(), and tryToOptimizeStoreOfMallocToGlobal().

◆ getMallocArraySize()

Value * llvm::getMallocArraySize ( CallInst CI,
const DataLayout DL,
const TargetLibraryInfo TLI,
bool  LookThroughSExt = false 
)

getMallocArraySize - Returns the array size of a malloc call.

If the argument passed to malloc is a multiple of the size of the malloced type, then return that multiple. For non-array mallocs, the multiple is constant 1. Otherwise, return NULL for mallocs whose array size cannot be determined.

Definition at line 360 of file MemoryBuiltins.cpp.

References assert(), computeArraySize(), and isMallocLikeFn().

Referenced by tryToOptimizeStoreOfMallocToGlobal().

◆ getMallocType()

PointerType * llvm::getMallocType ( const CallInst CI,
const TargetLibraryInfo TLI 
)

getMallocType - Returns the PointerType resulting from the malloc call.

The PointerType depends on the number of bitcast uses of the malloc call: 0: PointerType is the malloc calls' return type. 1: PointerType is the bitcast's result type. >1: Unique PointerType cannot be determined, return NULL.

The PointerType depends on the number of bitcast uses of the malloc call: 0: PointerType is the calls' return type. 1: PointerType is the bitcast's result type. >1: Unique PointerType cannot be determined, return NULL.

Definition at line 317 of file MemoryBuiltins.cpp.

References assert(), llvm::Value::getType(), isMallocLikeFn(), llvm::Value::user_begin(), and llvm::Value::user_end().

Referenced by getMallocAllocatedType().

◆ getMinMaxPred()

CmpInst::Predicate llvm::getMinMaxPred ( SelectPatternFlavor  SPF,
bool  Ordered = false 
)

Return the canonical comparison predicate for the specified minimum/maximum flavor.

Definition at line 5104 of file ValueTracking.cpp.

References llvm_unreachable, SPF_FMAXNUM, SPF_FMINNUM, SPF_SMAX, SPF_SMIN, SPF_UMAX, and SPF_UMIN.

Referenced by createMinMax(), and getInverseMinMaxPred().

◆ getNextAvailablePluginDiagnosticKind()

int llvm::getNextAvailablePluginDiagnosticKind ( )

Get the next available kind ID for a plugin diagnostic.

Each time this function is called, it returns a different number. Therefore, a plugin that wants to "identify" its own classes with a dynamic identifier, just have to use this method to get a new ID and assign it to each of its classes. The returned ID will be greater than or equal to DK_FirstPluginKind. Thus, the plugin identifiers will not conflict with the DiagnosticKind values.

Definition at line 46 of file DiagnosticInfo.cpp.

References DK_FirstPluginKind.

◆ getNodeHeader() [1/2]

BasicBlock * llvm::getNodeHeader ( BasicBlock BB)
inline

Definition at line 55 of file IntervalIterator.h.

◆ getNodeHeader() [2/2]

BasicBlock * llvm::getNodeHeader ( Interval I)
inline

Definition at line 56 of file IntervalIterator.h.

References I.

◆ getNumBytesForUTF8()

unsigned llvm::getNumBytesForUTF8 ( UTF8  firstByte)

Definition at line 519 of file ConvertUTF.cpp.

References trailingBytesForUTF8.

Referenced by llvm::sys::unicode::columnWidthUTF8(), and convertUTF8Sequence().

◆ getObjectSize()

bool llvm::getObjectSize ( const Value Ptr,
uint64_t &  Size,
const DataLayout DL,
const TargetLibraryInfo TLI,
ObjectSizeOpts  Opts = {} 
)

Compute the size of the object pointed by Ptr.

Returns true and the object size in Size if successful, and false otherwise. In this context, by object we mean the region of memory starting at Ptr to the end of the underlying object pointed to by Ptr.

Returns true and the object size in Size if successful, and false otherwise. If RoundToAlign is true, then Size is rounded up to the alignment of allocas, byval arguments, and global variables.

Definition at line 452 of file MemoryBuiltins.cpp.

References llvm::ObjectSizeOffsetVisitor::bothKnown(), llvm::ObjectSizeOffsetVisitor::compute(), llvm::Value::getContext(), and getSizeWithOverflow().

Referenced by computePointerICmp(), getObjectSize(), getPointerSize(), isObjectSize(), isObjectSmallerThan(), and lowerObjectSizeCall().

◆ getOpDesc()

static DWARFExpression::Operation::Description llvm::getOpDesc ( unsigned  OpCode)
static

Definition at line 108 of file DWARFExpression.cpp.

References getDescriptions().

Referenced by llvm::DWARFExpression::Operation::extract().

◆ getOptionalIntLoopAttribute()

llvm::Optional< int > llvm::getOptionalIntLoopAttribute ( Loop TheLoop,
StringRef  Name 
)

Find named metadata for a loop with an integer value.

Definition at line 236 of file LoopUtils.cpp.

References findStringMetadataForLoop(), llvm::ConstantInt::getSExtValue(), and None.

Referenced by hasUnrollAndJamTransformation(), hasUnrollTransformation(), hasVectorizeTransformation(), and warnAboutLeftoverTransformations().

◆ GetOrCreateFunctionComdat()

Comdat * llvm::GetOrCreateFunctionComdat ( Function F,
Triple &  T,
const std::string &  ModuleId 
)

Definition at line 75 of file Instrumentation.cpp.

References assert(), F, and llvm::Comdat::NoDuplicates.

◆ getOrCreateInitFunction()

Function * llvm::getOrCreateInitFunction ( Module M,
StringRef  Name 
)

◆ getOrCreateSanitizerCtorAndInitFunctions()

std::pair< Function *, FunctionCallee > llvm::getOrCreateSanitizerCtorAndInitFunctions ( Module M,
StringRef  CtorName,
StringRef  InitName,
ArrayRef< Type * >  InitArgTypes,
ArrayRef< Value * >  InitArgs,
function_ref< void(Function *, FunctionCallee)>  FunctionsCreatedCallback,
StringRef  VersionCheckName = StringRef() 
)

Creates sanitizer constructor function lazily.

If a constructor and init function already exist, this function returns it. Otherwise it calls createSanitizerCtorAndInitFunctions. The FunctionsCreatedCallback is invoked in that case, passing the new Ctor and Init function.

Returns
Returns pair of pointers to constructor, and init functions respectively.

Definition at line 144 of file ModuleUtils.cpp.

References assert(), createSanitizerCtorAndInitFunctions(), declareSanitizerInitFunction(), and llvm::IRBuilderBase::getVoidTy().

◆ getOrderedReduction()

Value * llvm::getOrderedReduction ( IRBuilder<> &  Builder,
Value Acc,
Value Src,
unsigned  Op,
RecurrenceDescriptor::MinMaxRecurrenceKind  MinMaxKind = RecurrenceDescriptor::MRK_Invalid,
ArrayRef< Value * >  RedOps = None 
)

◆ getOrEnforceKnownAlignment()

unsigned llvm::getOrEnforceKnownAlignment ( Value V,
unsigned  PrefAlign,
const DataLayout DL,
const Instruction CxtI = nullptr,
AssumptionCache AC = nullptr,
const DominatorTree DT = nullptr 
)

Try to ensure that the alignment of V is at least PrefAlign bytes.

If the owning object can be modified and has an alignment less than PrefAlign, it will be increased and PrefAlign returned. If the alignment cannot be increased, the known alignment of the value is returned.

It is not always possible to modify the alignment of the underlying object, so if alignment is important, a more reliable approach is to simply align all global variables and allocation instructions to their preferred alignment from the beginning.

Definition at line 1200 of file Local.cpp.

References assert(), computeKnownBits(), llvm::KnownBits::countMinTrailingZeros(), enforceKnownAlignment(), llvm::KnownBits::getBitWidth(), llvm::Value::getType(), llvm::Type::isPointerTy(), and llvm::Value::MaximumAlignment.

Referenced by getKnownAlignment(), HandleByValArgument(), llvm::InstCombiner::visitAllocaInst(), llvm::InstCombiner::visitCallInst(), llvm::InstCombiner::visitLoadInst(), and llvm::InstCombiner::visitStoreInst().

◆ getPassTimer()

Timer * llvm::getPassTimer ( Pass P)

◆ GetPointerBaseWithConstantOffset() [1/2]

const Value * llvm::GetPointerBaseWithConstantOffset ( const Value Ptr,
int64_t &  Offset,
const DataLayout DL 
)
inline

Definition at line 253 of file ValueTracking.h.

References GetPointerBaseWithConstantOffset().

◆ GetPointerBaseWithConstantOffset() [2/2]

Value * llvm::GetPointerBaseWithConstantOffset ( Value Ptr,
int64_t &  Offset,
const DataLayout DL 
)
inline

Analyze the specified pointer to see if it can be expressed as a base pointer plus a constant offset.

Return the base and offset to the caller.

This is a wrapper around Value::stripAndAccumulateConstantOffsets that creates and later unpacks the required APInt.

Definition at line 244 of file ValueTracking.h.

References llvm::DataLayout::getIndexTypeSizeInBits(), llvm::Value::getType(), and llvm::Value::stripAndAccumulateConstantOffsets().

Referenced by llvm::VNCoercion::analyzeLoadFromClobberingLoad(), llvm::VNCoercion::analyzeLoadFromClobberingWrite(), llvm::MemoryDependenceResults::getLoadLoadClobberFullWidthSize(), GetPointerBaseWithConstantOffset(), isOverwrite(), isSafeToLoadUnconditionally(), and removePartiallyOverlappedStores().

◆ getPointerOperand()

Value * llvm::getPointerOperand ( Value V)
inline

A helper function that returns the pointer operand of a load, store or GEP instruction.

Returns nullptr if not load, store, or GEP.

Definition at line 5267 of file Instructions.h.

References getLoadStorePointerOperand().

Referenced by llvm::AtomicRMWInst::getPointerAddressSpace(), and isUseTriviallyOptimizableToLiveOnEntry().

◆ getPredForICmpCode()

Constant * llvm::getPredForICmpCode ( unsigned  Code,
bool  Sign,
Type OpTy,
CmpInst::Predicate Pred 
)

This is the complement of getICmpCode.

It turns a predicate code into either a constant true or false or the predicate for a new ICmp. The sign is passed in to determine which kind of predicate to use in the new ICmp instruction. Non-NULL return value will be a true or false constant. NULL return means a new ICmp is needed. The predicate is output in Pred.

Definition at line 42 of file CmpInstAnalysis.cpp.

References llvm::ConstantInt::get(), llvm_unreachable, and llvm::CmpInst::makeCmpResultType().

Referenced by getNewICmpValue().

◆ getPtrStride()

int64_t llvm::getPtrStride ( PredicatedScalarEvolution PSE,
Value Ptr,
const Loop Lp,
const ValueToValueMap StridesMap = ValueToValueMap(),
bool  Assume = false,
bool  ShouldCheckWrap = true 
)

If the pointer has a constant stride return it in units of its element size.

Check whether the access through Ptr has a constant stride.

Otherwise return zero.

Ensure that it does not wrap in the address space, assuming the predicate associated with PSE is true.

If necessary this method will version the stride of the pointer according to PtrToStride and therefore add further predicates to PSE. The Assume parameter indicates if we are allowed to make additional run-time assumptions.

Definition at line 990 of file LoopAccessAnalysis.cpp.

References assert(), dbgs(), llvm::GlobalValue::getAddressSpace(), llvm::PredicatedScalarEvolution::getAsAddRec(), llvm::Module::getDataLayout(), llvm::LoopBase< BlockT, LoopT >::getHeader(), llvm::SCEVAddRecExpr::getLoop(), llvm::BasicBlock::getModule(), llvm::BasicBlock::getParent(), llvm::PredicatedScalarEvolution::getSE(), llvm::SCEVAddRecExpr::getStepRecurrence(), llvm::Value::getType(), llvm::PredicatedScalarEvolution::hasNoOverflow(), llvm::SCEVWrapPredicate::IncrementNUSW, isInBoundsGep(), isNoWrapAddRec(), llvm::Type::isPointerTy(), LLVM_DEBUG, NullPointerIsDefined(), replaceSymbolicStrideSCEV(), and llvm::PredicatedScalarEvolution::setNoOverflow().

Referenced by llvm::InterleavedAccessInfo::analyzeInterleaving(), llvm::LoopVectorizationLegality::isConsecutivePtr(), and isNoWrap().

◆ getRandomBytes()

std::error_code llvm::getRandomBytes ( void *  Buffer,
size_t  Size 
)

Definition at line 58 of file RandomNumberGenerator.cpp.

◆ getRefAddrSize()

static uint8_t llvm::getRefAddrSize ( uint8_t  AddrSize,
uint16_t  Version 
)
static

Definition at line 117 of file DWARFExpression.cpp.

Referenced by llvm::DWARFExpression::Operation::extract().

◆ getSafeVectorConstantForBinop()

static Constant * llvm::getSafeVectorConstantForBinop ( BinaryOperator::BinaryOps  Opcode,
Constant In,
bool  IsRHSConstant 
)
inlinestatic

Some binary operators require special handling to avoid poison and undefined behavior.

If a constant vector has undef elements, replace those undefs with identity constants if possible because those are always safe to execute. If no identity constant exists, replace undef with some other safe constant.

Definition at line 192 of file InstCombineInternal.h.

References assert(), llvm::AtomicRMWInst::FSub, llvm::DITypeRefArray::get(), llvm::Constant::getAggregateElement(), llvm::ConstantExpr::getBinOpIdentity(), llvm::Constant::getNullValue(), llvm::Value::getType(), llvm::Type::getVectorElementType(), llvm::Type::getVectorNumElements(), llvm::Type::isVectorTy(), llvm_unreachable, and llvm::AtomicRMWInst::Sub.

Referenced by foldSelectShuffle(), and foldSelectShuffleWith1Binop().

◆ GetShadowBytes()

SmallVector< uint8_t, 64 > llvm::GetShadowBytes ( const SmallVectorImpl< ASanStackVariableDescription > &  Vars,
const ASanStackFrameLayout Layout 
)

◆ GetShadowBytesAfterScope()

SmallVector< uint8_t, 64 > llvm::GetShadowBytesAfterScope ( const SmallVectorImpl< ASanStackVariableDescription > &  Vars,
const ASanStackFrameLayout Layout 
)

◆ getShuffleReduction()

Value * llvm::getShuffleReduction ( IRBuilder<> &  Builder,
Value Src,
unsigned  Op,
RecurrenceDescriptor::MinMaxRecurrenceKind  MinMaxKind = RecurrenceDescriptor::MRK_Invalid,
ArrayRef< Value * >  RedOps = None 
)

◆ getSLEB128Size()

unsigned llvm::getSLEB128Size ( int64_t  Value)

Utility function to get the size of the SLEB128-encoded value.

Definition at line 29 of file LEB128.cpp.

◆ getSourceGraphNode() [1/2]

BasicBlock * llvm::getSourceGraphNode ( Function ,
BasicBlock BB 
)
inline

◆ getSourceGraphNode() [2/2]

Interval * llvm::getSourceGraphNode ( IntervalPartition IP,
BasicBlock BB 
)
inline

Definition at line 64 of file IntervalIterator.h.

References llvm::IntervalPartition::getBlockInterval().

◆ getSplatValue()

const llvm::Value * llvm::getSplatValue ( const Value V)

Get splat value if the input is a splat vector or return nullptr.

The value may be extracted from a splat constants vector or from a sequence of instructions that broadcast a single value into a vector.

This function is not fully general. It checks only 2 cases: the input value is (1) a splat constant vector or (2) a sequence of instructions that broadcasts a scalar at element 0.

Definition at line 311 of file VectorUtils.cpp.

References llvm::Value::getType(), llvm::PatternMatch::m_InsertElement(), llvm::PatternMatch::m_ShuffleVector(), llvm::PatternMatch::m_Value(), llvm::PatternMatch::m_ZeroInt(), and llvm::PatternMatch::match().

Referenced by llvm::TargetTransformInfoImplCRTPBase< T >::getGEPCost(), and llvm::TargetTransformInfo::getOperandInfo().

◆ getStrideFromPointer()

Value * llvm::getStrideFromPointer ( Value Ptr,
ScalarEvolution SE,
Loop Lp 
)

Get the stride of a pointer access in a loop.

Looks for symbolic strides "a[i*stride]". Returns the symbolic stride, or null otherwise.

Definition at line 183 of file VectorUtils.cpp.

References llvm::ScalarEvolution::getSCEV(), llvm::SCEVAddRecExpr::getStepRecurrence(), llvm::Value::getType(), getUniqueCastUse(), llvm::SCEVUnknown::getValue(), llvm::Loop::isLoopInvariant(), scConstant, and stripGetElementPtr().

◆ GetStringLength()

uint64_t llvm::GetStringLength ( const Value V,
unsigned  CharSize = 8 
)

If we can compute the length of the string pointed to by the specified pointer, return 'len+1'.

If we can't, return 0.

Definition at line 3643 of file ValueTracking.cpp.

References GetStringLengthH(), llvm::Value::getType(), and llvm::Type::isPointerTy().

Referenced by llvm::ObjectSizeOffsetVisitor::visitCallSite().

◆ getStructTM()

static struct tm llvm::getStructTM ( TimePoint<>  TP)
inlinestatic

Definition at line 25 of file Chrono.cpp.

References assert(), and llvm::sys::toTimeT().

Referenced by operator<<().

◆ GetSuccessorNumber()

unsigned llvm::GetSuccessorNumber ( const BasicBlock BB,
const BasicBlock Succ 
)

Search for the specified successor of basic block BB and return its position in the terminator instruction's list of successors.

GetSuccessorNumber - Search for the specified successor of basic block BB and return its position in the terminator instruction's list of successors.

It is an error to call this with a block that is not a successor.

Definition at line 72 of file CFG.cpp.

References assert(), llvm::Instruction::getNumSuccessors(), llvm::Instruction::getSuccessor(), and llvm::BasicBlock::getTerminator().

Referenced by DemoteRegToStack(), and SplitEdge().

◆ getSwappedBytes()

uint24_t llvm::getSwappedBytes ( uint24_t  C)
inline

Needed by swapByteOrder().

Definition at line 36 of file DataExtractor.h.

◆ getTypeName()

template<typename DesiredTypeName >
StringRef llvm::getTypeName ( )
inline

We provide a function which tries to compute the (demangled) name of a type statically.

This routine may fail on some platforms or for particularly unusual types. Do not use it for anything other than logging and debugging aids. It isn't portable or dependendable in any real sense.

The returned StringRef will point into a static storage duration string. However, it may not be null terminated and may be some strangely aligned inner substring of a larger string.

Definition at line 27 of file TypeName.h.

References assert().

◆ getULEB128Size()

unsigned llvm::getULEB128Size ( uint64_t  Value)

Utility function to get the size of the ULEB128-encoded value.

Definition at line 19 of file LEB128.cpp.

◆ getUnaryFloatFn()

StringRef llvm::getUnaryFloatFn ( const TargetLibraryInfo TLI,
Type Ty,
LibFunc  DoubleFn,
LibFunc  FloatFn,
LibFunc  LongDoubleFn 
)

Get the name of the overloaded unary floating point function corresponding to Ty.

Definition at line 778 of file BuildLibCalls.cpp.

References assert(), llvm::Type::DoubleTyID, llvm::Type::FloatTyID, llvm::TargetLibraryInfo::getName(), llvm::Type::getTypeID(), llvm::Type::HalfTyID, hasUnaryFloatFn(), and llvm_unreachable.

Referenced by emitUnaryFloatFnCall().

◆ GetUnderlyingObject() [1/2]

const Value * llvm::GetUnderlyingObject ( const Value V,
const DataLayout DL,
unsigned  MaxLookup = 6 
)
inline

Definition at line 332 of file ValueTracking.h.

References GetUnderlyingObject().

◆ GetUnderlyingObject() [2/2]

Value * llvm::GetUnderlyingObject ( Value V,
const DataLayout DL,
unsigned  MaxLookup = 6 
)

◆ GetUnderlyingObjects()

void llvm::GetUnderlyingObjects ( const Value V,
SmallVectorImpl< const Value * > &  Objects,
const DataLayout DL,
LoopInfo LI = nullptr,
unsigned  MaxLookup = 6 
)

This method is similar to GetUnderlyingObject except that it can look through phi and select instructions and return multiple objects.

If LoopInfo is passed, loop phis are further analyzed. If a pointer accesses different objects in each iteration, we don't look through the phi node. E.g. consider this loop nest:

int **A; for (i) for (j) { A[i][j] = A[i-1][j] * B[j] }

This is transformed by Load-PRE to stash away A[i] for the next iteration of the outer loop:

Curr = A[0]; // Prev_0 for (i: 1..N) { Prev = Curr; // Prev = PHI (Prev_0, Curr) Curr = A[i]; for (j: 0..N) { Curr[j] = Prev[j] * B[j] } }

Since A[i] and A[i-1] are independent pointers, getUnderlyingObjects should not assume that Curr and Prev share the same underlying object thus it shouldn't look through the phi above.

Definition at line 3749 of file ValueTracking.cpp.

References GetUnderlyingObject(), llvm::LoopInfoBase< BlockT, LoopT >::isLoopHeader(), isSameUnderlyingObjectInLoop(), and P.

Referenced by AddAliasScopeMetadata(), computePointerICmp(), getUnderlyingObjectsForCodeGen(), and handleEndBlock().

◆ getUnderlyingObjectsForCodeGen()

bool llvm::getUnderlyingObjectsForCodeGen ( const Value V,
SmallVectorImpl< Value * > &  Objects,
const DataLayout DL 
)

This is a wrapper around GetUnderlyingObjects and adds support for basic ptrtoint+arithmetic+inttoptr sequences.

It returns false if unidentified object is found in GetUnderlyingObjects.

Definition at line 3822 of file ValueTracking.cpp.

References llvm::Operator::getOpcode(), llvm::Value::getType(), getUnderlyingObjectFromInt(), GetUnderlyingObjects(), isIdentifiedObject(), and llvm::Type::isPointerTy().

◆ getUniqueCastUse()

Value * llvm::getUniqueCastUse ( Value Ptr,
Loop Lp,
Type Ty 
)

If a value has only one user that is a CastInst, return it.

Definition at line 167 of file VectorUtils.cpp.

References llvm::Value::getType(), and llvm::Value::users().

Referenced by getStrideFromPointer().

◆ getUniqued()

template<class T , class InfoT >
static T * llvm::getUniqued ( DenseSet< T *, InfoT > &  Store,
const typename InfoT::KeyTy &  Key 
)
static

Definition at line 22 of file MetadataImpl.h.

References I.

Referenced by uniquifyImpl().

◆ getUniqueExitBlocksHelper()

template<class BlockT , class LoopT , typename PredicateT >
void llvm::getUniqueExitBlocksHelper ( const LoopT *  L,
SmallVectorImpl< BlockT * > &  ExitBlocks,
PredicateT  Pred 
)

◆ getUniqueModuleId()

std::string llvm::getUniqueModuleId ( Module M)

Produce a unique identifier for this module by taking the MD5 sum of the names of the module's strong external symbols that are not comdat members.

This identifier is normally guaranteed to be unique, or the program would fail to link due to multiply defined symbols.

If the module has no strong external symbols (such a module may still have a semantic effect if it performs global initialization), we cannot produce a unique identifier for this module, so we return the empty string.

Definition at line 252 of file ModuleUtils.cpp.

References F, llvm::MD5::final(), llvm::MD5::stringifyResult(), and llvm::MD5::update().

◆ GetUnrollMetadata()

MDNode * llvm::GetUnrollMetadata ( MDNode LoopID,
StringRef  Name 
)

Given an llvm.loop loop id metadata node, returns the loop hint metadata node with the given name (for example, "llvm.loop.unroll.count").

If no such metadata node exists, then nullptr is returned.

Definition at line 960 of file LoopUnroll.cpp.

References assert(), llvm::MDNode::getNumOperands(), llvm::MDNode::getOperand(), and llvm::MDString::getString().

Referenced by GetUnrollMetadataForLoop().

◆ getVectorIntrinsicIDForCall()

Intrinsic::ID llvm::getVectorIntrinsicIDForCall ( const CallInst CI,
const TargetLibraryInfo TLI 
)

Returns intrinsic ID for call.

For the input call instruction it finds mapping intrinsic and returns its intrinsic ID, in case it does not found it return not_intrinsic.

For the input call instruction it finds mapping intrinsic and returns its ID, in case it does not found it return not_intrinsic.

Definition at line 110 of file VectorUtils.cpp.

References getIntrinsicForCallSite(), isTriviallyVectorizable(), and llvm::Intrinsic::not_intrinsic.

Referenced by llvm::LoopVectorizationCostModel::getVectorIntrinsicCost(), InTreeUserNeedToExtract(), llvm::VPRecipeBuilder::tryToWiden(), and llvm::InnerLoopVectorizer::widenInstruction().

◆ getWeightFromBranchProb()

uint32_t llvm::getWeightFromBranchProb ( const BranchProbability  Prob)
inline

◆ getWiderType()

static Type * llvm::getWiderType ( const DataLayout DL,
Type Ty0,
Type Ty1 
)
static

◆ GetWindowsOSVersion()

llvm::VersionTuple llvm::GetWindowsOSVersion ( )

Returns the Windows version as Major.Minor.0.BuildNumber.

Uses RtlGetVersion or GetVersionEx under the hood depending on what is available. GetVersionEx is deprecated, but this API exposes the build number which can be useful for working around certain kernel bugs.

◆ greatestCommonDivisor()

template<typename T >
T llvm::greatestCommonDivisor ( A,
B 
)
inline

Return the greatest common divisor of the values using Euclid's algorithm.

Definition at line 563 of file MathExtras.h.

◆ GreatestCommonDivisor64()

uint64_t llvm::GreatestCommonDivisor64 ( uint64_t  A,
uint64_t  B 
)
inline

Definition at line 572 of file MathExtras.h.

Referenced by UnrollLoop().

◆ handleAllErrors() [1/2]

void llvm::handleAllErrors ( Error  E)
inline

Check that E is a non-error, then drop it.

If E is an error, llvm_unreachable will be called.

Definition at line 910 of file Error.h.

References cantFail().

◆ handleAllErrors() [2/2]

template<typename... HandlerTs>
void llvm::handleAllErrors ( Error  E,
HandlerTs &&...  Handlers 
)

Behaves the same as handleErrors, except that by contract all errors must be handled by the given handlers (i.e.

there must be no remaining errors after running the handlers, or llvm_unreachable is called).

Definition at line 904 of file Error.h.

References cantFail(), and handleErrors().

Referenced by annotateAllFunctions(), consumeError(), llvm::DWARFContext::dumpWarning(), errorToErrorCode(), getLazyIRModule(), logAllUnhandledErrors(), parseIR(), llvm::FileCheckPattern::printSubstitutions(), llvm::RemarkSetupErrorInfo< ThisError >::RemarkSetupErrorInfo(), llvm::legacy::FunctionPassManager::run(), and toString().

◆ handleErrorImpl() [1/2]

Error llvm::handleErrorImpl ( std::unique_ptr< ErrorInfoBase Payload)
inline

Definition at line 860 of file Error.h.

Referenced by handleErrorImpl().

◆ handleErrorImpl() [2/2]

template<typename HandlerT , typename... HandlerTs>
Error llvm::handleErrorImpl ( std::unique_ptr< ErrorInfoBase Payload,
HandlerT &&  Handler,
HandlerTs &&...  Handlers 
)

Definition at line 865 of file Error.h.

References llvm::cl::desc::apply(), and handleErrorImpl().

◆ handleErrors()

template<typename... HandlerTs>
Error llvm::handleErrors ( Error  E,
HandlerTs &&...  Hs 
)

Pass the ErrorInfo(s) contained in E to their respective handlers.

Any unhandled errors (or Errors returned by handlers) are re-concatenated and returned. Because this function returns an error, its result must also be checked or returned. If you intend to handle all errors use handleAllErrors (which returns void, and will abort() on unhandled errors) instead.

Definition at line 881 of file Error.h.

Referenced by handleAllErrors(), handleExpected(), llvm::lto::localCache(), and PrintNoMatch().

◆ handleExpected()

template<typename T , typename RecoveryFtor , typename... HandlerTs>
Expected< T > llvm::handleExpected ( Expected< T >  ValOrErr,
RecoveryFtor &&  RecoveryPath,
HandlerTs &&...  Handlers 
)

Handle any errors (if present) in an Expected<T>, then try a recovery path.

If the incoming value is a success value it is returned unmodified. If it is a failure value then it the contained error is passed to handleErrors. If handleErrors is able to handle the error then the RecoveryPath functor is called to supply the final result. If handleErrors is not able to handle all errors then the unhandled errors are returned.

This utility enables the follow pattern:

enum FooStrategy { Aggressive, Conservative };
Expected<Foo> foo(FooStrategy S);
auto ResultOrErr =
foo(Aggressive),
[]() { return foo(Conservative); },
[](AggressiveStrategyError&) {
// Implicitly conusme this - we'll recover by using a conservative
// strategy.
});
Expected< T > handleExpected(Expected< T > ValOrErr, RecoveryFtor &&RecoveryPath, HandlerTs &&... Handlers)
Handle any errors (if present) in an Expected<T>, then try a recovery path.
Definition: Error.h:939

Definition at line 939 of file Error.h.

References handleErrors().

◆ hardware_concurrency()

unsigned llvm::hardware_concurrency ( )

Get the number of threads that the current program can execute concurrently.

On some systems std::thread::hardware_concurrency() returns the total number of cores, without taking affinity into consideration. Returns 1 when LLVM is configured with LLVM_ENABLE_THREADS=OFF. Fallback to std::thread::hardware_concurrency() if sched_getaffinity is not available.

Definition at line 75 of file Threading.cpp.

◆ hasDisableAllTransformsHint()

bool llvm::hasDisableAllTransformsHint ( const Loop L)

◆ hasDistributeTransformation()

TransformationMode llvm::hasDistributeTransformation ( Loop L)

◆ hash_value()

hash_code llvm::hash_value ( const APFloat &  Arg)

◆ hasIterationCountInvariantInParent()

bool llvm::hasIterationCountInvariantInParent ( Loop L,
ScalarEvolution SE 
)

Check inner loop (L) backedge count is known to be invariant on all iterations of its outer loop.

If the loop has no parent, this is trivially true.

Definition at line 664 of file LoopUtils.cpp.

References llvm::ScalarEvolution::getExitCount(), llvm::ScalarEvolution::getLoopDisposition(), llvm::LoopBase< BlockT, LoopT >::getLoopLatch(), llvm::LoopBase< BlockT, LoopT >::getParentLoop(), llvm::SCEV::getType(), llvm::Type::isIntegerTy(), and llvm::ScalarEvolution::LoopInvariant.

Referenced by isSafeToUnrollAndJam().

◆ hasLICMVersioningTransformation()

TransformationMode llvm::hasLICMVersioningTransformation ( Loop L)

◆ hasOutsideLoopUser()

static bool llvm::hasOutsideLoopUser ( const Loop TheLoop,
Instruction Inst,
SmallPtrSetImpl< Value * > &  AllowedExit 
)
static

Check that the instruction has outside loop users and is not an identified reduction variable.

Definition at line 417 of file LoopVectorizationLegality.cpp.

References llvm::LoopBase< BlockT, LoopT >::contains(), dbgs(), LLVM_DEBUG, and llvm::Value::users().

◆ hasUnaryFloatFn()

bool llvm::hasUnaryFloatFn ( const TargetLibraryInfo TLI,
Type Ty,
LibFunc  DoubleFn,
LibFunc  FloatFn,
LibFunc  LongDoubleFn 
)

Check whether the overloaded unary floating point function corresponding to Ty is available.

Definition at line 763 of file BuildLibCalls.cpp.

References llvm::Type::DoubleTyID, llvm::Type::FloatTyID, llvm::Type::getTypeID(), llvm::Type::HalfTyID, and llvm::TargetLibraryInfo::has().

Referenced by getSqrtCall(), getUnaryFloatFn(), and llvm::InstCombiner::visitFDiv().

◆ hasUnrollAndJamTransformation()

TransformationMode llvm::hasUnrollAndJamTransformation ( Loop L)

◆ hasUnrollTransformation()

TransformationMode llvm::hasUnrollTransformation ( Loop L)

◆ hasUTF16ByteOrderMark()

bool llvm::hasUTF16ByteOrderMark ( ArrayRef< char SrcBytes)

Returns true if a blob of text starts with a UTF-16 big or little endian byte order mark.

Definition at line 80 of file ConvertUTFWrapper.cpp.

Referenced by ExpandResponseFile().

◆ hasVectorInstrinsicScalarOpd()

bool llvm::hasVectorInstrinsicScalarOpd ( Intrinsic::ID  ID,
unsigned  ScalarOpdIdx 
)

Identifies if the vector form of the intrinsic has a scalar operand.

Definition at line 91 of file VectorUtils.cpp.

Referenced by InTreeUserNeedToExtract(), and llvm::InnerLoopVectorizer::widenInstruction().

◆ hasVectorizeTransformation()

TransformationMode llvm::hasVectorizeTransformation ( Loop L)

◆ haveNoCommonBitsSet()

bool llvm::haveNoCommonBitsSet ( const Value LHS,
const Value RHS,
const DataLayout DL,
AssumptionCache AC = nullptr,
const Instruction CxtI = nullptr,
const DominatorTree DT = nullptr,
bool  UseInstrInfo = true 
)

◆ heavyweight_hardware_concurrency()

unsigned llvm::heavyweight_hardware_concurrency ( )

Get the amount of currency to use for tasks requiring significant memory or other resources.

Currently based on physical cores, if available for the host system, otherwise falls back to thread::hardware_concurrency(). Returns 1 when LLVM is configured with LLVM_ENABLE_THREADS=OFF

Definition at line 62 of file Threading.cpp.

References llvm::sys::getHostNumPhysicalCores().

◆ Hi_32()

constexpr uint32_t llvm::Hi_32 ( uint64_t  Value)
inlineconstexpr

Return the high 32 bits of a 64 bit value.

Definition at line 283 of file MathExtras.h.

Referenced by KnuthDiv().

◆ hoistAllInstructionsInto()

void llvm::hoistAllInstructionsInto ( BasicBlock DomBlock,
Instruction InsertPt,
BasicBlock BB 
)

Hoist all of the instructions in the IfBlock to the dominant block DomBlock, by moving its instructions to the insertion point InsertPt.

The moved instructions receive the insertion point debug location values (DILocations) and their debug intrinsic instructions are removed.

Definition at line 2556 of file Local.cpp.

References llvm::BasicBlock::begin(), dropDebugUsers(), llvm::BasicBlock::end(), llvm::Instruction::getDebugLoc(), llvm::BasicBlock::getInstList(), llvm::BasicBlock::getTerminator(), and I.

Referenced by FoldTwoEntryPHINode().

◆ hoistRegion()

bool llvm::hoistRegion ( DomTreeNode N,
AliasAnalysis AA,
LoopInfo LI,
DominatorTree DT,
TargetLibraryInfo TLI,
Loop CurLoop,
AliasSetTracker CurAST,
MemorySSAUpdater MSSAU,
ICFLoopSafetyInfo SafetyInfo,
SinkAndHoistLICMFlags Flags,
OptimizationRemarkEmitter ORE 
)

Walk the specified region of the CFG (defined by all blocks dominated by the specified block, and that are in the current loop) in depth first order w.r.t the DominatorTree.

This allows us to visit definitions before uses, allowing us to hoist a loop body in one pass without iteration. Takes DomTreeNode, AliasAnalysis, LoopInfo, DominatorTree, DataLayout, TargetLibraryInfo, Loop, AliasSet information for all instructions of the loop and loop safety information as arguments. Diagnostics is emitted via ORE. It returns changed status.

This allows us to visit definitions before uses, allowing us to hoist a loop body in one pass without iteration.

Definition at line 788 of file LICM.cpp.

References assert(), llvm::BasicBlock::begin(), canSinkOrHoistInst(), ConstantFoldInstruction(), ControlFlowHoisting, llvm::AliasSetTracker::copyValue(), llvm::TargetFolder::CreateFDiv(), llvm::TargetFolder::CreateFMul(), dbgs(), llvm::ICFLoopSafetyInfo::doesNotWriteMemoryBefore(), llvm::DominatorTree::dominates(), llvm::BasicBlock::end(), eraseInstruction(), llvm::DITypeRefArray::get(), llvm::DomTreeNodeBase< NodeT >::getBlock(), llvm::DomTreeNodeBase< NodeT >::getIDom(), llvm::PHINode::getIncomingBlock(), llvm::LoopBase< BlockT, LoopT >::getLoopPreheader(), llvm::MemorySSAUpdater::getMemorySSA(), llvm::Value::getName(), llvm::DominatorTreeBase< NodeT, IsPostDom >::getNode(), llvm::PHINode::getNumIncomingValues(), llvm::Instruction::getParent(), llvm::BasicBlock::getTerminator(), llvm::Loop::hasLoopInvariantOperands(), hoist, I, llvm::ICFLoopSafetyInfo::insertInstructionTo(), inSubLoop(), llvm::ICFLoopSafetyInfo::isGuaranteedToExecute(), isGuard(), isInstructionTriviallyDead(), llvm::Loop::isLoopInvariant(), isSafeToExecuteUnconditionally(), LLVM_DEBUG, moveInstructionBefore(), N, llvm::LoopBlocksRPO::perform(), llvm::PHINode::setIncomingBlock(), llvm::LoopInfoBase< BlockT, LoopT >::verify(), llvm::DominatorTreeBase< NodeT, IsPostDom >::verify(), llvm::MemorySSA::verifyMemorySSA(), and VerifyMemorySSA.

◆ HUerrBound()

static unsigned int llvm::HUerrBound ( bool  inexactMultiply,
unsigned int  HUerr1,
unsigned int  HUerr2 
)
static

Definition at line 513 of file APFloat.cpp.

References assert().

◆ inconvertibleErrorCode()

std::error_code llvm::inconvertibleErrorCode ( )

The value returned by this function can be returned from convertToErrorCode for Error values where no sensible translation to std::error_code exists.

It should only be used in this situation, and should never be used where a sensible conversion to std::error_code is available, as attempts to convert to/from this error will result in a fatal error. (i.e. it is a programmatic error to try to convert such a value).

Definition at line 77 of file Error.cpp.

References ErrorErrorCat.

Referenced by llvm::DWARFDebugNames::SentinelError::convertToErrorCode(), llvm::BinaryStreamError::convertToErrorCode(), llvm::FileCheckUndefVarError::convertToErrorCode(), llvm::FileCheckErrorDiagnostic::convertToErrorCode(), llvm::FileCheckNotFoundError::convertToErrorCode(), llvm::json::ParseError::convertToErrorCode(), llvm::SymbolRemappingParseError::convertToErrorCode(), createError(), errorToErrorCode(), llvm::pdb::hashTagRecord(), llvm::PassPlugin::Load(), llvm::PassBuilder::parseAAPipeline(), parseCachePruningPolicy(), parseDuration(), and llvm::PassBuilder::parsePassPipeline().

◆ inferLibFuncAttributes() [1/2]

bool llvm::inferLibFuncAttributes ( Function F,
const TargetLibraryInfo TLI 
)

◆ inferLibFuncAttributes() [2/2]

bool llvm::inferLibFuncAttributes ( Module M,
StringRef  Name,
const TargetLibraryInfo TLI 
)

Definition at line 131 of file BuildLibCalls.cpp.

References F, and inferLibFuncAttributes().

◆ InitializeAllAsmParsers()

void llvm::InitializeAllAsmParsers ( )
inline

InitializeAllAsmParsers - The main program should call this function if it wants all asm parsers that LLVM is configured to support, to make them available via the TargetRegistry.

It is legal for a client to make multiple calls to this function.

Definition at line 95 of file TargetSelect.h.

◆ InitializeAllAsmPrinters()

void llvm::InitializeAllAsmPrinters ( )
inline

InitializeAllAsmPrinters - The main program should call this function if it wants all asm printers that LLVM is configured to support, to make them available via the TargetRegistry.

It is legal for a client to make multiple calls to this function.

Definition at line 85 of file TargetSelect.h.

◆ InitializeAllDisassemblers()

void llvm::InitializeAllDisassemblers ( )
inline

InitializeAllDisassemblers - The main program should call this function if it wants all disassemblers that LLVM is configured to support, to make them available via the TargetRegistry.

It is legal for a client to make multiple calls to this function.

Definition at line 105 of file TargetSelect.h.

◆ InitializeAllTargetInfos()

void llvm::InitializeAllTargetInfos ( )
inline

InitializeAllTargetInfos - The main program should call this function if it wants access to all available targets that LLVM is configured to support, to make them available via the TargetRegistry.

It is legal for a client to make multiple calls to this function.

Definition at line 52 of file TargetSelect.h.

Referenced by InitializeAllTargets().

◆ InitializeAllTargetMCs()

void llvm::InitializeAllTargetMCs ( )
inline

InitializeAllTargetMCs - The main program should call this function if it wants access to all available target MC that LLVM is configured to support, to make them available via the TargetRegistry.

It is legal for a client to make multiple calls to this function.

Definition at line 75 of file TargetSelect.h.

◆ InitializeAllTargets()

void llvm::InitializeAllTargets ( )
inline

InitializeAllTargets - The main program should call this function if it wants access to all available target machines that LLVM is configured to support, to make them available via the TargetRegistry.

It is legal for a client to make multiple calls to this function.

Definition at line 62 of file TargetSelect.h.

References InitializeAllTargetInfos().

◆ initializeCoroCleanupPass()

void llvm::initializeCoroCleanupPass ( PassRegistry &  )

◆ initializeCoroEarlyPass()

void llvm::initializeCoroEarlyPass ( PassRegistry &  )

◆ initializeCoroElidePass()

void llvm::initializeCoroElidePass ( PassRegistry &  )

◆ initializeCoroSplitPass()

void llvm::initializeCoroSplitPass ( PassRegistry &  )

◆ initializeDummyCGSCCPassPass()

void llvm::initializeDummyCGSCCPassPass ( PassRegistry &  )

◆ initializeInferAddressSpacesPass()

void llvm::initializeInferAddressSpacesPass ( PassRegistry &  )

◆ initializeLazyBFIPassPass()

void llvm::initializeLazyBFIPassPass ( PassRegistry &  Registry)

Helper for client passes to initialize dependent passes for LBFI.

Definition at line 67 of file LazyBlockFrequencyInfo.cpp.

References initializeLazyBPIPassPass().

◆ initializeLazyBPIPassPass()

void llvm::initializeLazyBPIPassPass ( PassRegistry &  Registry)

Helper for client passes to initialize dependent passes for LBPI.

Definition at line 69 of file LazyBranchProbabilityInfo.cpp.

Referenced by initializeLazyBFIPassPass().

◆ InitializeNativeTarget()

bool llvm::InitializeNativeTarget ( )
inline

InitializeNativeTarget - The main program should call this function to initialize the native target corresponding to the host.

This is useful for JIT applications to ensure that the target gets linked in correctly.

It is legal for a client to make multiple calls to this function.

Definition at line 115 of file TargetSelect.h.

◆ InitializeNativeTargetAsmParser()

bool llvm::InitializeNativeTargetAsmParser ( )
inline

InitializeNativeTargetAsmParser - The main program should call this function to initialize the native target asm parser.

Definition at line 141 of file TargetSelect.h.

◆ InitializeNativeTargetAsmPrinter()

bool llvm::InitializeNativeTargetAsmPrinter ( )
inline

InitializeNativeTargetAsmPrinter - The main program should call this function to initialize the native target asm printer.

Definition at line 129 of file TargetSelect.h.

◆ InitializeNativeTargetDisassembler()

bool llvm::InitializeNativeTargetDisassembler ( )
inline

InitializeNativeTargetDisassembler - The main program should call this function to initialize the native target disassembler.

Definition at line 153 of file TargetSelect.h.

◆ initializeWarnMissedTransformationsLegacyPass()

void llvm::initializeWarnMissedTransformationsLegacyPass ( PassRegistry &  )

◆ InlineFunction() [1/2]

llvm::InlineResult llvm::InlineFunction ( CallBase CB,
InlineFunctionInfo IFI,
AAResults CalleeAAR = nullptr,
bool  InsertLifetime = true 
)

This function inlines the called function into the basic block of the caller.

This returns false if it is not possible to inline this call. The program is still in a well defined state if this occurs though.

Note that this only does one level of inlining. For example, if the instruction 'call B' is inlined, and 'B' calls 'C', then the call to 'C' now exists in the instruction stream. Similarly this will inline a recursive function by one level.

Note that while this routine is allowed to cleanup and optimize the inlined code to minimize the actual inserted code, it must not delete code in the caller as users of this routine may have pointers to instructions in the caller that need to remain stable.

If ForwardVarArgsTo is passed, inlining a function with varargs is allowed and all varargs at the callsite will be passed to any calls to ForwardVarArgsTo. The caller of InlineFunction has to make sure any varargs are only used by ForwardVarArgsTo.

Definition at line 87 of file InlineFunction.cpp.

References InlineFunction().

Referenced by InlineCallIfPossible(), InlineFunction(), InsertSafepointPoll(), and llvm::AlwaysInlinerPass::run().

◆ InlineFunction() [2/2]

llvm::InlineResult llvm::InlineFunction ( CallSite  CS,
InlineFunctionInfo IFI,
AAResults CalleeAAR = nullptr,
bool  InsertLifetime = true,
Function ForwardVarArgsTo = nullptr 
)

This function inlines the called function into the basic block of the caller.

This returns false if it is not possible to inline this call. The program is still in a well defined state if this occurs though.

Note that this only does one level of inlining. For example, if the instruction 'call B' is inlined, and 'B' calls 'C', then the call to 'C' now exists in the instruction stream. Similarly this will inline a recursive function by one level.

Definition at line 1537 of file InlineFunction.cpp.

References AddAliasScopeMetadata(), AddAlignmentAssumptions(), llvm::PHINode::addIncoming(), allocaWouldBeStaticInEntry(), llvm::DIExpression::ApplyOffset, llvm::Function::arg_begin(), llvm::CallBase::arg_begin(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, IterTy >::arg_begin(), llvm::Function::arg_end(), llvm::CallBase::arg_end(), llvm::CallBase::arg_operands(), assert(), llvm::BasicBlock::begin(), llvm::InlineFunctionInfo::CalleeBFI, llvm::InlineFunctionInfo::CallerBFI, llvm::InlineFunctionInfo::CG, changeToUnreachable(), classifyEHPersonality(), CloneAliasScopeMetadata(), CloneAndPruneFunctionInto(), llvm::ClonedCodeInfo::ContainsCalls, llvm::ClonedCodeInfo::ContainsDynamicAllocas, llvm::BranchInst::Create(), llvm::CallInst::Create(), llvm::CallBrInst::Create(), llvm::InvokeInst::Create(), llvm::PHINode::Create(), llvm::IRBuilder< T, Inserter >::CreateBitCast(), llvm::IRBuilder< T, Inserter >::CreateCall(), llvm::IRBuilderBase::CreateLifetimeEnd(), llvm::IRBuilderBase::CreateLifetimeStart(), llvm::IRBuilder< T, Inserter >::CreateRet(), llvm::IRBuilder< T, Inserter >::CreateRetVoid(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, IterTy >::doesNotThrow(), llvm::BasicBlock::eraseFromParent(), llvm::Instruction::eraseFromParent(), F, fixupLineNumbers(), llvm::BasicBlock::front(), llvm::Function::front(), llvm::AttributeList::get(), llvm::UndefValue::get(), llvm::ConstantInt::get(), llvm::AllocaInst::getAllocatedType(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, IterTy >::getArgOperand(), llvm::AllocaInst::getArraySize(), llvm::InlineFunctionInfo::GetAssumptionCache, llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, IterTy >::getAttributes(), llvm::CallBase::getAttributes(), llvm::BlockFrequencyInfo::getBlockFreq(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, IterTy >::getCalledFunction(), llvm::CallBase::getCalledFunction(), llvm::CallBase::getCalledOperand(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, IterTy >::getCalledValue(), llvm::Function::getCallingConv(), llvm::CallBase::getCallingConv(), llvm::Value::getContext(), llvm::Instruction::getDebugLoc(), llvm::Intrinsic::getDeclaration(), llvm::Function::getEntryCount(), llvm::BasicBlock::getFirstNonPHI(), llvm::BlockFrequency::getFrequency(), llvm::Instruction::getFunction(), llvm::Function::getFunctionType(), llvm::CallBase::getFunctionType(), llvm::Function::getGC(), llvm::BasicBlock::getInstList(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, IterTy >::getInstruction(), llvm::IRBuilderBase::getInt64Ty(), llvm::CallBase::getIntrinsicID(), llvm::Value::getName(), llvm::InvokeInst::getNormalDest(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, IterTy >::getNumArgOperands(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, IterTy >::getNumOperandBundles(), llvm::FunctionType::getNumParams(), llvm::Instruction::getOpcode(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, IterTy >::getOperandBundle(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, IterTy >::getOperandBundleAt(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, IterTy >::getOperandBundlesAsDefs(), llvm::CallBase::getOperandBundlesAsDefs(), llvm::Function::getParamAlignment(), llvm::AttributeList::getParamAttributes(), llvm::BasicBlock::getParent(), llvm::Instruction::getParent(), llvm::Function::getPersonalityFn(), llvm::Function::getReturnType(), llvm::ReturnInst::getReturnValue(), llvm::Function::getSubprogram(), llvm::OperandBundleUse::getTagID(), llvm::CallInst::getTailCallKind(), llvm::BasicBlock::getTerminatingDeoptimizeCall(), llvm::BasicBlock::getTerminatingMustTailCall(), llvm::BasicBlock::getTerminator(), llvm::Value::getType(), llvm::InvokeInst::getUnwindDest(), getUnwindDestToken(), HandleByValArgument(), HandleByValArgumentInit(), HandleInlinedEHPad(), HandleInlinedLandingPad(), llvm::Function::hasGC(), hasLifetimeMarkers(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, IterTy >::hasOperandBundles(), llvm::Function::hasPersonalityFn(), I, llvm::InlineFunctionInfo::InlinedCallSites, isAsynchronousEHPersonality(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, IterTy >::isByValArgument(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, IterTy >::isCall(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, IterTy >::isCallBr(), llvm::GlobalValue::isDeclaration(), llvm::CallInst::isMustTailCall(), isScopedEHPersonality(), llvm::AllocaInst::isSwiftError(), llvm::Type::isVoidTy(), llvm::LLVMContext::OB_deopt, llvm::LLVMContext::OB_funclet, llvm::ClonedCodeInfo::OperandBundleCallSites, pred_begin(), pred_end(), PropagateParallelLoopAccessMetadata(), llvm::InlineFunctionInfo::PSI, llvm::Value::replaceAllUsesWith(), replaceDbgDeclareForAlloca(), llvm::InlineFunctionInfo::reset(), llvm::CallBase::setAttributes(), llvm::BlockFrequencyInfo::setBlockFreq(), llvm::Function::setCallingConv(), llvm::CallBase::setCallingConv(), llvm::Instruction::setDebugLoc(), llvm::CallBase::setDoesNotThrow(), llvm::User::setOperand(), llvm::CallInst::setTailCallKind(), SimplifyInstruction(), llvm::BasicBlock::splitBasicBlock(), llvm::InlineFunctionInfo::StaticAllocas, llvm::Constant::stripPointerCasts(), llvm::Value::stripPointerCasts(), Tag, llvm::Value::takeName(), llvm::CallInst::TCK_None, llvm::CallInst::TCK_NoTail, updateCallerBFI(), UpdateCallGraphAfterInlining(), updateCallProfile(), and llvm::Value::use_empty().

◆ insertDebugValuesForPHIs()

void llvm::insertDebugValuesForPHIs ( BasicBlock BB,
SmallVectorImpl< PHINode * > &  InsertedPHIs 
)

◆ InsertPreheaderForLoop()

BasicBlock * llvm::InsertPreheaderForLoop ( Loop L,
DominatorTree DT,
LoopInfo LI,
MemorySSAUpdater MSSAU,
bool  PreserveLCSSA 
)

InsertPreheaderForLoop - Once we discover that a loop doesn't have a preheader, this method is called to insert one.

This method has two phases: preheader insertion and analysis updating.

Definition at line 122 of file LoopSimplify.cpp.

References llvm::LoopBase< BlockT, LoopT >::contains(), dbgs(), llvm::LoopBase< BlockT, LoopT >::getHeader(), llvm::Value::getName(), LLVM_DEBUG, P, placeSplitBlockCarefully(), pred_begin(), pred_end(), and SplitBlockPredecessors().

Referenced by simplifyOneLoop().

◆ inst_begin() [1/4]

const_inst_iterator llvm::inst_begin ( const Function F)
inline

Definition at line 150 of file InstIterator.h.

References F.

◆ inst_begin() [2/4]

const_inst_iterator llvm::inst_begin ( const Function F)
inline

Definition at line 136 of file InstIterator.h.

References F.

◆ inst_begin() [3/4]

inst_iterator llvm::inst_begin ( Function F)
inline

Definition at line 145 of file InstIterator.h.

References F.

◆ inst_begin() [4/4]

inst_iterator llvm::inst_begin ( Function F)
inline

◆ inst_end() [1/4]

const_inst_iterator llvm::inst_end ( const Function F)
inline

Definition at line 153 of file InstIterator.h.

References F.

◆ inst_end() [2/4]

const_inst_iterator llvm::inst_end ( const Function F)
inline

Definition at line 139 of file InstIterator.h.

References F.

◆ inst_end() [3/4]

inst_iterator llvm::inst_end ( Function F)
inline

Definition at line 146 of file InstIterator.h.

References F.

◆ inst_end() [4/4]

inst_iterator llvm::inst_end ( Function F)
inline

◆ install_bad_alloc_error_handler()

void llvm::install_bad_alloc_error_handler ( fatal_error_handler_t  handler,
void *  user_data = nullptr 
)

Installs a new bad alloc error handler that should be used whenever a bad alloc error, e.g.

failing malloc/calloc, is encountered by LLVM.

The user can install a bad alloc handler, in order to define the behavior in case of failing allocations, e.g. throwing an exception. Note that this handler must not trigger any additional allocations itself.

If no error handler is installed the default is to print the error message to stderr, and call exit(1). If an error handler is installed then it is the handler's responsibility to log the message, it will no longer be printed to stderr. If the error handler returns, then exit(1) will be called.

Parameters
user_data- An argument which will be passed to the installed error handler.

Definition at line 128 of file ErrorHandling.cpp.

References assert(), BadAllocErrorHandler, BadAllocErrorHandlerMutex, BadAllocErrorHandlerUserData, and ErrorHandler.

◆ install_fatal_error_handler()

void llvm::install_fatal_error_handler ( fatal_error_handler_t  handler,
void *  user_data = nullptr 
)

install_fatal_error_handler - Installs a new error handler to be used whenever a serious (non-recoverable) error is encountered by LLVM.

If no error handler is installed the default is to print the error message to stderr, and call exit(1). If an error handler is installed then it is the handler's responsibility to log the message, it will no longer be printed to stderr. If the error handler returns, then exit(1) will be called.

It is dangerous to naively use an error handler which throws an exception. Even though some applications desire to gracefully recover from arbitrary faults, blindly throwing exceptions through unfamiliar code isn't a way to achieve this.

Parameters
user_data- An argument which will be passed to the install error handler.

Definition at line 63 of file ErrorHandling.cpp.

References assert(), ErrorHandler, ErrorHandlerMutex, and ErrorHandlerUserData.

Referenced by LLVMInstallFatalErrorHandler(), and llvm::ScopedFatalErrorHandler::ScopedFatalErrorHandler().

◆ install_out_of_memory_new_handler()

void llvm::install_out_of_memory_new_handler ( )

Definition at line 191 of file ErrorHandling.cpp.

References assert(), and out_of_memory_new_handler().

Referenced by llvm::InitLLVM::InitLLVM().

◆ instructions() [1/4]

const_inst_range llvm::instructions ( const Function F)
inline

Definition at line 156 of file InstIterator.h.

References F, inst_begin(), and inst_end().

◆ instructions() [2/4]

const_inst_range llvm::instructions ( const Function F)
inline

Definition at line 142 of file InstIterator.h.

References F, inst_begin(), and inst_end().

◆ instructions() [3/4]

inst_range llvm::instructions ( Function F)
inline

Definition at line 147 of file InstIterator.h.

References F, inst_begin(), and inst_end().

◆ instructions() [4/4]

inst_range llvm::instructions ( Function F)
inline

Definition at line 133 of file InstIterator.h.

References F, inst_begin(), and inst_end().

◆ internalizeModule()

bool llvm::internalizeModule ( Module TheModule,
std::function< bool(const GlobalValue &)>  MustPreserveGV,
CallGraph CG = nullptr 
)
inline

Helper function to internalize functions and variables in a Module.

Definition at line 70 of file Internalize.h.

References llvm::InternalizePass::internalizeModule().

Referenced by thinLTOInternalizeModule().

◆ interpretDecimal()

static void llvm::interpretDecimal ( StringRef::iterator  begin,
StringRef::iterator  end,
decimalInfo D 
)
static

Definition at line 367 of file APFloat.cpp.

References assert(), decDigitValue(), dot, readExponent(), and skipLeadingZeroesAndAnyDot().

◆ intersectAccessGroups()

MDNode * llvm::intersectAccessGroups ( const Instruction Inst1,
const Instruction Inst2 
)

Compute the access-group list of access groups that Inst1 and Inst2 are both in.

If either instruction does not access memory at all, it is considered to be in every list.

If the list contains just one access group, it is returned directly. If the list is empty, returns nullptr.

Definition at line 545 of file VectorUtils.cpp.

References addToAccessGroupList(), assert(), llvm::MDNode::get(), llvm::Value::getContext(), llvm::Instruction::getMetadata(), llvm::MDNode::getNumOperands(), isValidAsAccessGroup(), llvm::Instruction::mayReadOrWriteMemory(), llvm::LLVMContext::MD_access_group, and llvm::MDNode::operands().

Referenced by combineMetadata(), and propagateMetadata().

◆ intersectModRef()

LLVM_NODISCARD ModRefInfo llvm::intersectModRef ( const ModRefInfo  MRI1,
const ModRefInfo  MRI2 
)
inline

◆ intervals_begin() [1/2]

function_interval_iterator llvm::intervals_begin ( Function F,
bool  DeleteInts = true 
)
inline

◆ intervals_begin() [2/2]

interval_part_interval_iterator llvm::intervals_begin ( IntervalPartition IP,
bool  DeleteIntervals = true 
)
inline

Definition at line 257 of file IntervalIterator.h.

◆ intervals_end() [1/2]

function_interval_iterator llvm::intervals_end ( Function )
inline

◆ intervals_end() [2/2]

interval_part_interval_iterator llvm::intervals_end ( IntervalPartition IP)
inline

Definition at line 261 of file IntervalIterator.h.

◆ isa()

template<class X , class Y >
LLVM_NODISCARD bool llvm::isa ( const Y Val)
inline

Definition at line 141 of file Casting.h.

References X(), and Y().

◆ isa_and_nonnull()

template<class X , class Y >
LLVM_NODISCARD bool llvm::isa_and_nonnull ( const Y Val)
inline

Definition at line 150 of file Casting.h.

◆ isAcquireOrStronger()

bool llvm::isAcquireOrStronger ( AtomicOrdering  ao)
inline

Definition at line 127 of file AtomicOrdering.h.

References Acquire, and isAtLeastOrStrongerThan().

◆ isAllocaPromotable()

bool llvm::isAllocaPromotable ( const AllocaInst AI)

Return true if this alloca is legal for promotion.

This is true if there are only loads, stores, and lifetime markers (transitively) using this alloca. This also enforces that there is only ever one layer of bitcasts or GEPs between the alloca and the lifetime markers.

Definition at line 64 of file PromoteMemoryToRegister.cpp.

References llvm::PointerType::getAddressSpace(), llvm::IRBuilderBase::getInt8PtrTy(), llvm::AllocaInst::getType(), onlyUsedByLifetimeMarkers(), and llvm::Value::users().

Referenced by promoteMemoryToRegister().

◆ isAllocationFn()

bool llvm::isAllocationFn ( const Value V,
const TargetLibraryInfo TLI,
bool  LookThroughBitCast = false 
)

Tests if a value is a call or invoke to a library function that allocates or reallocates memory (either malloc, calloc, realloc, or strdup like).

Definition at line 222 of file MemoryBuiltins.cpp.

References AnyAlloc, and getAllocationData().

Referenced by CleanupPointerRootUsers(), isNoAliasFn(), IsSafeComputationToRemove(), and llvm::InstCombiner::visitGetElementPtrInst().

◆ isAllocLikeFn()

bool llvm::isAllocLikeFn ( const Value V,
const TargetLibraryInfo TLI,
bool  LookThroughBitCast = false 
)

Tests if a value is a call or invoke to a library function that allocates memory (either malloc, calloc, or strdup like).

Definition at line 261 of file MemoryBuiltins.cpp.

References AllocLike, and getAllocationData().

Referenced by computePointerICmp(), eliminateDeadStores(), handleEndBlock(), isNeverEqualToUnescapedAlloc(), promoteLoopAccessesToScalars(), and wouldInstructionBeTriviallyDead().

◆ isAssumeLikeIntrinsic()

bool llvm::isAssumeLikeIntrinsic ( const Instruction I)

Return true if it is an intrinsic that cannot be speculated but also cannot trap.

Definition at line 501 of file ValueTracking.cpp.

References F, and I.

Referenced by isValidAssumeForContext().

◆ isAsynchronousEHPersonality()

bool llvm::isAsynchronousEHPersonality ( EHPersonality  Pers)
inline

Returns true if this personality function catches asynchronous exceptions.

Definition at line 49 of file EHPersonalities.h.

References llvm_unreachable, MSVC_Win64SEH, and MSVC_X86SEH.

Referenced by canSimplifyInvokeNoUnwind(), and InlineFunction().

◆ isAtLeastOrStrongerThan()

bool llvm::isAtLeastOrStrongerThan ( AtomicOrdering  ao,
AtomicOrdering  other 
)
inline

Definition at line 104 of file AtomicOrdering.h.

Referenced by areLoadsReorderable(), isAcquireOrStronger(), and isReleaseOrStronger().

◆ isBytewiseValue()

Value * llvm::isBytewiseValue ( Value V,
const DataLayout DL 
)

If the specified value can be set by repeating the same byte in memory, return the i8 value that it is represented with.

This is true for all i8 values obviously, but is also true for i32 0, i32 -1, i16 0xF0F0, double 0.0 etc. If the value can't be handled with a repeated byte store (e.g. i16 0x1234), return null. If the value is entirely undef and padding, return undef.

Definition at line 3177 of file ValueTracking.cpp.

References assert(), llvm::UndefValue::get(), llvm::ConstantInt::get(), llvm::ConstantExpr::getBitCast(), llvm::Value::getContext(), llvm::IRBuilderBase::getInt16Ty(), llvm::IRBuilderBase::getInt32Ty(), llvm::IRBuilderBase::getInt64Ty(), llvm::IRBuilderBase::getInt8Ty(), llvm::ConstantExpr::getIntegerCast(), llvm::IRBuilderBase::getIntNTy(), llvm::Constant::getNullValue(), llvm::DataLayout::getPointerSizeInBits(), llvm::Value::getType(), llvm::DataLayout::getTypeStoreSize(), I, isBytewiseValue(), and llvm::Type::isIntegerTy().

Referenced by isBytewiseValue().

◆ isCallocLikeFn()

bool llvm::isCallocLikeFn ( const Value V,
const TargetLibraryInfo TLI,
bool  LookThroughBitCast = false 
)

Tests if a value is a call or invoke to a library function that allocates zero-filled memory (such as calloc).

Definition at line 246 of file MemoryBuiltins.cpp.

References CallocLike, and getAllocationData().

Referenced by eliminateNoopStore(), and extractCallocCall().

◆ isCanonicalPredicate()

static bool llvm::isCanonicalPredicate ( CmpInst::Predicate  Pred)
inlinestatic

Predicate canonicalization reduces the number of patterns that need to be matched by other transforms.

For example, we may swap the operands of a conditional branch or select to create a compare with a canonical (inverted) predicate which is then more likely to be matched with other values.

Definition at line 99 of file InstCombineInternal.h.

References llvm::CmpInst::FCMP_OGE, llvm::CmpInst::FCMP_OLE, llvm::CmpInst::FCMP_ONE, llvm::CmpInst::ICMP_NE, llvm::CmpInst::ICMP_SGE, llvm::CmpInst::ICMP_SLE, llvm::CmpInst::ICMP_UGE, and llvm::CmpInst::ICMP_ULE.

Referenced by llvm::InstCombiner::visitBranchInst().

◆ isConsecutiveAccess()

bool llvm::isConsecutiveAccess ( Value A,
Value B,
const DataLayout DL,
ScalarEvolution SE,
bool  CheckType = true 
)

◆ IsConstantOffsetFromGlobal()

bool llvm::IsConstantOffsetFromGlobal ( Constant C,
GlobalValue *&  GV,
APInt &  Offset,
const DataLayout DL 
)

If this constant is a constant offset from a global, return the global and the constant.

Because of constantexprs, this function is recursive.

Definition at line 285 of file ConstantFolding.cpp.

References llvm::DataLayout::getIndexTypeSizeInBits(), llvm::GlobalValue::getType(), and IsConstantOffsetFromGlobal().

Referenced by IsConstantOffsetFromGlobal(), and SimplifyRelativeLoad().

◆ isCriticalEdge()

bool llvm::isCriticalEdge ( const Instruction TI,
unsigned  SuccNum,
bool  AllowIdenticalEdges = false 
)

Return true if the specified edge is a critical edge.

isCriticalEdge - Return true if the specified edge is a critical edge.

Critical edges are edges from a block with multiple successors to a block with multiple predecessors.

Definition at line 88 of file CFG.cpp.

References assert(), llvm::Instruction::getNumSuccessors(), llvm::Instruction::getSuccessor(), I, llvm::Instruction::isTerminator(), pred_begin(), and pred_end().

Referenced by llvm::CFGMST< Edge, BBInfo >::buildEdges(), DemoteRegToStack(), and SplitCriticalEdge().

◆ isCurrentDebugType()

bool llvm::isCurrentDebugType ( const char Type)

isCurrentDebugType - Return true if the specified string is the debug type specified on the command line, or if none was specified on the command line with the -debug-only=X option.

Return true if the specified string is the debug type specified on the command line, or if none was specified on the command line with the -debug-only=X option.

Definition at line 50 of file Debug.cpp.

References CurrentDebugType.

◆ isDereferenceableAndAlignedPointer() [1/2]

bool llvm::isDereferenceableAndAlignedPointer ( const Value V,
Type Ty,
unsigned  Align,
const DataLayout DL,
const Instruction CtxI = nullptr,
const DominatorTree DT = nullptr 
)

Returns true if V is always a dereferenceable pointer with alignment greater or equal than requested.

If the context instruction is specified performs context-sensitive analysis and returns true if the pointer is dereferenceable at the specified instruction.

Definition at line 128 of file Loads.cpp.

References llvm::DataLayout::getABITypeAlignment(), llvm::DataLayout::getIndexTypeSizeInBits(), llvm::Value::getType(), llvm::DataLayout::getTypeStoreSize(), and llvm::Type::isSized().

Referenced by canTransformToMemCmp(), isDereferenceableForAllocaSize(), isSafeToSpeculativelyExecute(), and promoteLoopAccessesToScalars().

◆ isDereferenceableAndAlignedPointer() [2/2]

bool llvm::isDereferenceableAndAlignedPointer ( const Value V,
unsigned  Align,
const APInt &  Size,
const DataLayout DL,
const Instruction CtxI = nullptr,
const DominatorTree DT = nullptr 
)

Returns true if V is always dereferenceable for Size byte with alignment greater or equal than requested.

If the context instruction is specified performs context-sensitive analysis and returns true if the pointer is dereferenceable at the specified instruction.

Definition at line 118 of file Loads.cpp.

◆ isDereferenceablePointer()

bool llvm::isDereferenceablePointer ( const Value V,
Type Ty,
const DataLayout DL,
const Instruction CtxI = nullptr,
const DominatorTree DT = nullptr 
)

Return true if this is always a dereferenceable pointer.

If the context instruction is specified perform context-sensitive analysis and return true if the pointer is dereferenceable at the specified instruction.

Definition at line 152 of file Loads.cpp.

References isDereferenceableAndAlignedPointer().

Referenced by allCallersPassValidPointerForArgument().

◆ isFreeCall() [1/2]

const CallInst * llvm::isFreeCall ( const Value I,
const TargetLibraryInfo TLI 
)

◆ isFreeCall() [2/2]

CallInst * llvm::isFreeCall ( Value I,
const TargetLibraryInfo TLI 
)
inline

Definition at line 153 of file MemoryBuiltins.h.

References I, and isFreeCall().

◆ IsFreeToInvert()

static bool llvm::IsFreeToInvert ( Value V,
bool  WillInvertAllUses 
)
inlinestatic

Return true if the specified value is free to invert (apply ~ to).

This happens in cases where the ~ can be eliminated. If WillInvertAllUses is true, work under the assumption that the caller intends to remove all uses of V and only keep uses of ~V.

Definition at line 142 of file InstCombineInternal.h.

References llvm::Constant::getAggregateElement(), llvm::Value::getType(), llvm::Type::getVectorNumElements(), llvm::Type::isVectorTy(), llvm::PatternMatch::m_Not(), llvm::PatternMatch::m_Select(), llvm::PatternMatch::m_Value(), llvm::PatternMatch::match(), and llvm::AtomicRMWInst::Sub.

Referenced by matchDeMorgansLaws(), sinkNotIntoXor(), llvm::InstCombiner::visitAnd(), llvm::InstCombiner::visitSub(), and llvm::InstCombiner::visitXor().

◆ isFuncletEHPersonality()

bool llvm::isFuncletEHPersonality ( EHPersonality  Pers)
inline

Returns true if this is a personality function that invokes handler funclets (which must return to it).

Definition at line 64 of file EHPersonalities.h.

References CoreCLR, llvm_unreachable, MSVC_CXX, MSVC_Win64SEH, and MSVC_X86SEH.

◆ isFunctionInPrintList()

bool llvm::isFunctionInPrintList ( StringRef  FunctionName)

isFunctionInPrintList - returns true if a function should be printed via

Definition at line 132 of file LegacyPassManager.cpp.

References PrintFuncsList.

Referenced by llvm::PrintFunctionPass::run(), and llvm::PrintModulePass::run().

◆ isGCRelocate() [1/2]

bool llvm::isGCRelocate ( const CallBase Call)

Definition at line 36 of file Statepoint.cpp.

Referenced by isGCRelocate(), isSafeToEliminateVarargsCast(), and needsStatepoint().

◆ isGCRelocate() [2/2]

bool llvm::isGCRelocate ( const Value V)

Definition at line 40 of file Statepoint.cpp.

References isGCRelocate().

◆ isGCResult() [1/2]

bool llvm::isGCResult ( const CallBase Call)

Definition at line 46 of file Statepoint.cpp.

Referenced by isGCResult(), isSafeToEliminateVarargsCast(), and needsStatepoint().

◆ isGCResult() [2/2]

bool llvm::isGCResult ( const Value V)

Definition at line 48 of file Statepoint.cpp.

References isGCResult().

◆ isGEPBasedOnPointerToString()

bool llvm::isGEPBasedOnPointerToString ( const GEPOperator GEP,
unsigned  CharSize = 8 
)

◆ isGuaranteedToExecuteForEveryIteration()

bool llvm::isGuaranteedToExecuteForEveryIteration ( const Instruction I,
const Loop L 
)

Return true if this function can prove that the instruction I is executed for every iteration of the loop L.

Note that this currently only considers the loop header.

Definition at line 4299 of file ValueTracking.cpp.

References llvm::LoopBase< BlockT, LoopT >::getHeader(), I, isGuaranteedToTransferExecutionToSuccessor(), and llvm_unreachable.

Referenced by isMustExecuteIn().

◆ isGuaranteedToTransferExecutionToSuccessor() [1/2]

bool llvm::isGuaranteedToTransferExecutionToSuccessor ( const BasicBlock BB)

Returns true if this block does not contain a potential implicit exit.

This is equivelent to saying that all instructions within the basic block are guaranteed to transfer execution to their successor within the basic block. This has the same assumptions w.r.t. undefined behavior as the instruction variant of this function.

Definition at line 4290 of file ValueTracking.cpp.

References llvm::BasicBlock::begin(), llvm::BasicBlock::end(), I, and isGuaranteedToTransferExecutionToSuccessor().

◆ isGuaranteedToTransferExecutionToSuccessor() [2/2]

bool llvm::isGuaranteedToTransferExecutionToSuccessor ( const Instruction I)

Return true if this function can prove that the instruction I will always transfer execution to one of its successors (including the next instruction that follows within a basic block).

E.g. this is not guaranteed for function calls that could loop infinitely.

In other words, this function returns false for instructions that may transfer execution or fail to transfer execution in a way that is not captured in the CFG nor in the sequence of instructions within a basic block.

Undefined behavior is assumed not to happen, so e.g. division is guaranteed to transfer execution to the following instruction even though division by zero might cause undefined behavior.

Definition at line 4223 of file ValueTracking.cpp.

References I, and llvm::PatternMatch::match().

Referenced by addArgumentAttrsFromCallsites(), llvm::SimpleLoopSafetyInfo::computeLoopSafetyInfo(), isGuaranteedToExecuteForEveryIteration(), isGuaranteedToTransferExecutionToSuccessor(), llvm::ImplicitControlFlowTracking::isSpecialInstruction(), llvm::JumpThreadingPass::ProcessBlock(), programUndefinedIfFullPoison(), ReplaceFoldableUses(), llvm::InstCombiner::simplifyDivRemOfSelectWithZeroOp(), and llvm::JumpThreadingPass::SimplifyPartiallyRedundantLoad().

◆ isGuard()

bool llvm::isGuard ( const User U)

Returns true iff U has semantics of a guard expressed in a form of call of llvm.experimental.guard intrinsic.

Definition at line 17 of file GuardUtils.cpp.

Referenced by calculateUnswitchCostMultiplier(), explicifyGuards(), hoistRegion(), isKnownNonNullFromDominatingCondition(), isSupportedGuardInstruction(), lowerGuardIntrinsic(), llvm::JumpThreadingPass::ProcessGuards(), and unswitchBestCondition().

◆ isGuardAsWidenableBranch()

bool llvm::isGuardAsWidenableBranch ( const User U)

Returns true iff U has semantics of a guard expressed in a form of a widenable conditional branch to deopt block.

Definition at line 22 of file GuardUtils.cpp.

References parseWidenableBranch().

Referenced by isSupportedGuardInstruction().

◆ isIdentifiedFunctionLocal()

bool llvm::isIdentifiedFunctionLocal ( const Value V)

Return true if V is umabigously identified at the function-level.

Different IdentifiedFunctionLocals can't alias. Further, an IdentifiedFunctionLocal can not alias with any function arguments other than itself, which is not necessarily true for IdentifiedObjects.

Definition at line 892 of file AliasAnalysis.cpp.

References isNoAliasArgument(), and isNoAliasCall().

Referenced by AddAliasScopeMetadata().

◆ isIdentifiedObject()

bool llvm::isIdentifiedObject ( const Value V)

Return true if this pointer refers to a distinct and identifiable object.

This returns true for: Global Variables and Functions (but not Global Aliases) Allocas ByVal and NoAlias Arguments NoAlias returns (e.g. calls to malloc)

Definition at line 880 of file AliasAnalysis.cpp.

References isNoAliasCall().

Referenced by llvm::AAResults::callCapturesBefore(), getUnderlyingObjectsForCodeGen(), isObjectSmallerThan(), and underlyingObjectsAlias().

◆ isImpliedByDomCondition()

Optional< bool > llvm::isImpliedByDomCondition ( const Value Cond,
const Instruction ContextI,
const DataLayout DL 
)

Return the boolean condition value in the context of the given instruction if it is known based on dominating conditions.

Definition at line 5381 of file ValueTracking.cpp.

References assert(), llvm::Instruction::getParent(), llvm::BasicBlock::getSinglePredecessor(), llvm::BasicBlock::getTerminator(), isImpliedCondition(), llvm::PatternMatch::m_Br(), llvm::PatternMatch::m_Value(), llvm::PatternMatch::match(), and None.

Referenced by SimplifySelectInst().

◆ isImpliedCondition()

Optional< bool > llvm::isImpliedCondition ( const Value LHS,
const Value RHS,
const DataLayout DL,
bool  LHSIsTrue = true,
unsigned  Depth = 0 
)

Return true if RHS is known to be implied true by LHS.

Return false if RHS is known to be implied false by LHS. Otherwise, return None if no implication can be made. A & B must be i1 (boolean) values or a vector of such values. Note that the truth table for implication is the same as <=u on i1 values (but not <=s!). The truth table for both is: | T | F (B) T | T | F F | T | T (A)

Definition at line 5339 of file ValueTracking.cpp.

References assert(), llvm::BinaryOperator::getOpcode(), llvm::Value::getType(), isImpliedCondAndOr(), isImpliedCondICmps(), llvm::Type::isIntegerTy(), llvm::Type::isIntOrIntVectorTy(), llvm::Type::isVectorTy(), MaxDepth, and None.

Referenced by isImpliedByDomCondition(), isImpliedCondAndOr(), llvm::JumpThreadingPass::ProcessImpliedCondition(), simplifyICmpOfBools(), and llvm::JumpThreadingPass::ThreadGuard().

◆ isInlineViable()

InlineResult llvm::isInlineViable ( Function Callee)

Minimal filter to detect invalid constructs for inlining.

Definition at line 2102 of file InlineCost.cpp.

References F, llvm::BlockAddress::get(), and users.

Referenced by getInlineCost(), and llvm::AlwaysInlinerPass::run().

◆ isInstructionTriviallyDead()

bool llvm::isInstructionTriviallyDead ( Instruction I,
const TargetLibraryInfo TLI = nullptr 
)

Return true if the result produced by the instruction is not used, and the instruction has no side effects.

isInstructionTriviallyDead - Return true if the result produced by the instruction is not used, and the instruction has no side effects.

Definition at line 353 of file Local.cpp.

References I, and wouldInstructionBeTriviallyDead().

Referenced by AddReachableCodeToWorklist(), CloneAndPruneIntoFromInst(), ConstantPropUsersOf(), DCEInstruction(), deleteDeadInstruction(), DeleteTriviallyDeadInstructions(), doCallSiteSplitting(), handleEndBlock(), hoistRegion(), inlineCallsImpl(), llvm::JumpThreadingPass::ProcessBlock(), RecursivelyDeleteTriviallyDeadInstructions(), llvm::InstCombiner::run(), llvm::ReassociatePass::run(), runSCCP(), simplifyAndDCEInstruction(), simplifyLoopAfterUnroll(), simplifyLoopInst(), and sinkRegion().

◆ isInt()

template<unsigned N>
constexpr bool llvm::isInt ( int64_t  x)
inlineconstexpr

Checks if an integer fits into the given bit width.

Definition at line 298 of file MathExtras.h.

References N.

◆ isInt< 16 >()

template<>
constexpr bool llvm::isInt< 16 > ( int64_t  x)
inlineconstexpr

Definition at line 305 of file MathExtras.h.

◆ isInt< 32 >()

template<>
constexpr bool llvm::isInt< 32 > ( int64_t  x)
inlineconstexpr

◆ isInt< 8 >()

template<>
constexpr bool llvm::isInt< 8 > ( int64_t  x)
inlineconstexpr

Definition at line 302 of file MathExtras.h.

◆ isIntN()

bool llvm::isIntN ( unsigned  N,
int64_t  x 
)
inline

Checks if an signed integer fits into the given (dynamic) bit width.

Definition at line 397 of file MathExtras.h.

References maxIntN(), minIntN(), and N.

Referenced by convertStrToNumber(), llvm::ConstantInt::isValueValidForType(), and TruncIfPossible().

◆ isIntrinsicReturningPointerAliasingArgumentWithoutCapturing()

bool llvm::isIntrinsicReturningPointerAliasingArgumentWithoutCapturing ( const CallBase Call)

◆ isIRPrintingPass()

bool llvm::isIRPrintingPass ( Pass P)

Return true if a pass is for IR printing.

Definition at line 154 of file IRPrintingPasses.cpp.

References P.

◆ isKnownNegation()

bool llvm::isKnownNegation ( const Value X,
const Value Y,
bool  NeedNSW = false 
)

Return true if the two given values are negation.

Currently can recoginze Value pair: 1: <X, Y> if X = sub (0, Y) or Y = sub (0, X) 2: <X, Y> if X = sub (A, B) and Y = sub (B, A)

Definition at line 4735 of file ValueTracking.cpp.

References assert(), llvm::PatternMatch::m_NSWSub(), llvm::PatternMatch::m_Specific(), llvm::PatternMatch::m_Sub(), llvm::PatternMatch::m_Value(), llvm::PatternMatch::m_ZeroInt(), llvm::PatternMatch::match(), X(), and Y().

Referenced by matchSelectPattern(), SimplifyAddInst(), SimplifySDivInst(), and SimplifySRemInst().

◆ isKnownNegative()

bool llvm::isKnownNegative ( const Value V,
const DataLayout DL,
unsigned  Depth = 0,
AssumptionCache AC = nullptr,
const Instruction CxtI = nullptr,
const DominatorTree DT = nullptr,
bool  UseInstrInfo = true 
)

Returns true if the given value is known be negative (i.e.

non-positive and non-zero).

Definition at line 266 of file ValueTracking.cpp.

References computeKnownBits(), and llvm::KnownBits::isNegative().

Referenced by computeKnownBitsMul().

◆ isKnownNegativeInLoop()

bool llvm::isKnownNegativeInLoop ( const SCEV S,
const Loop L,
ScalarEvolution SE 
)

Returns true if we can prove that S is defined and always negative in loop L.

Definition at line 942 of file LoopUtils.cpp.

References llvm::SCEV::getType(), llvm::ScalarEvolution::getZero(), llvm::ScalarEvolution::isAvailableAtLoopEntry(), and llvm::ScalarEvolution::isLoopEntryGuardedByCond().

◆ isKnownNeverNaN()

bool llvm::isKnownNeverNaN ( const Value V,
const TargetLibraryInfo TLI,
unsigned  Depth = 0 
)

◆ isKnownNonEqual()

bool llvm::isKnownNonEqual ( const Value V1,
const Value V2,
const DataLayout DL,
AssumptionCache AC = nullptr,
const Instruction CxtI = nullptr,
const DominatorTree DT = nullptr,
bool  UseInstrInfo = true 
)

Return true if the given values are known to be non-equal when defined.

Supports scalar integer types only.

Definition at line 276 of file ValueTracking.cpp.

References safeCxtI().

Referenced by aliasSameBasePointerGEPs(), and SimplifyICmpInst().

◆ isKnownNonNegative()

bool llvm::isKnownNonNegative ( const Value V,
const DataLayout DL,
unsigned  Depth = 0,
AssumptionCache AC = nullptr,
const Instruction CxtI = nullptr,
const DominatorTree DT = nullptr,
bool  UseInstrInfo = true 
)

Returns true if the give value is known to be non-negative.

Definition at line 245 of file ValueTracking.cpp.

References computeKnownBits(), and llvm::KnownBits::isNonNegative().

Referenced by llvm::InstCombiner::commonShiftTransforms(), computeKnownBitsMul(), detectShiftUntilZeroIdiom(), and isKnownPositive().

◆ isKnownNonNegativeInLoop()

bool llvm::isKnownNonNegativeInLoop ( const SCEV S,
const Loop L,
ScalarEvolution SE 
)

Returns true if we can prove that S is defined and always non-negative in loop L.

Definition at line 949 of file LoopUtils.cpp.

References llvm::SCEV::getType(), llvm::ScalarEvolution::getZero(), llvm::ScalarEvolution::isAvailableAtLoopEntry(), and llvm::ScalarEvolution::isLoopEntryGuardedByCond().

◆ isKnownNonZero()

bool llvm::isKnownNonZero ( const Value V,
const DataLayout DL,
unsigned  Depth = 0,
AssumptionCache AC = nullptr,
const Instruction CxtI = nullptr,
const DominatorTree DT = nullptr,
bool  UseInstrInfo = true 
)

Return true if the given value is known to be non-zero when defined.

For vectors, return true if every element is known to be non-zero when defined. For pointers, if the context instruction and dominator tree are specified, perform context-sensitive analysis and return true if the pointer couldn't possibly be null at the specified instruction. Supports values with integer or pointer type and vectors of integers.

Definition at line 238 of file ValueTracking.cpp.

References safeCxtI().

Referenced by computePointerICmp(), foldCttzCtlz(), AANonNullImpl::generatePredicate(), llvm::LazyValueInfo::getPredicateAt(), AANonNullCallSiteArgument::initialize(), isDereferenceableAndAlignedPointer(), isReturnNonNull(), promoteSingleBlockAlloca(), rewriteSingleStoreAlloca(), simplifyICmpWithZero(), AANonNullArgument::updateImpl(), llvm::InstCombiner::visitCallInst(), and llvm::InstCombiner::visitPHINode().

◆ isKnownPositive()

bool llvm::isKnownPositive ( const Value V,
const DataLayout DL,
unsigned  Depth = 0,
AssumptionCache AC = nullptr,
const Instruction CxtI = nullptr,
const DominatorTree DT = nullptr,
bool  UseInstrInfo = true 
)

Returns true if the given value is known be positive (i.e.

non-negative and non-zero).

Definition at line 254 of file ValueTracking.cpp.

References isKnownNonNegative(), and isKnownNonZero().

◆ isKnownToBeAPowerOfTwo()

bool llvm::isKnownToBeAPowerOfTwo ( const Value V,
const DataLayout DL,
bool  OrZero = false,
unsigned  Depth = 0,
AssumptionCache AC = nullptr,
const Instruction CxtI = nullptr,
const DominatorTree DT = nullptr,
bool  UseInstrInfo = true 
)

Return true if the given value is known to have exactly one bit set when defined.

For vectors return true if every element is known to be a power of two when defined. Supports values with integer or pointer type and vectors of integers. If 'OrZero' is set, then return true if the given value is either a power of two or zero.

Definition at line 228 of file ValueTracking.cpp.

References safeCxtI().

Referenced by llvm::InstCombiner::isKnownToBeAPowerOfTwo(), and SimplifyAndInst().

◆ isLegalToPromote()

bool llvm::isLegalToPromote ( CallSite  CS,
Function Callee,
const char **  FailureReason = nullptr 
)

Return true if the given indirect call site can be made to call Callee.

This function ensures that the number and type of the call site's arguments and return value match those of the given function. If the types do not match exactly, they must at least be bitcast compatible. If FailureReason is non-null and the indirect call cannot be promoted, the failure reason will be stored in it.

Definition at line 319 of file CallPromotionUtils.cpp.

References llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, IterTy >::arg_size(), assert(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, IterTy >::getArgument(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, IterTy >::getCalledFunction(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, IterTy >::getInstruction(), llvm::Value::getType(), I, and llvm::CastInst::isBitOrNoopPointerCastable().

◆ isLegalUTF8()

static Boolean llvm::isLegalUTF8 ( const UTF8 source,
int  length 
)
static

◆ isLegalUTF8Sequence()

Boolean llvm::isLegalUTF8Sequence ( const UTF8 source,
const UTF8 sourceEnd 
)

Definition at line 412 of file ConvertUTF.cpp.

References isLegalUTF8(), and trailingBytesForUTF8.

Referenced by findMaximalSubpartOfIllFormedUTF8Sequence().

◆ isLegalUTF8String()

Boolean llvm::isLegalUTF8String ( const UTF8 **  source,
const UTF8 sourceEnd 
)

Definition at line 529 of file ConvertUTF.cpp.

References isLegalUTF8(), and trailingBytesForUTF8.

Referenced by ConvertUTF8toWide(), convertWideToUTF8(), and llvm::json::isUTF8().

◆ isLibFreeFunction()

bool llvm::isLibFreeFunction ( const Function F,
const LibFunc  TLIFn 
)

isLibFreeFunction - Returns true if the function is a builtin free()

Definition at line 375 of file MemoryBuiltins.cpp.

References F, llvm::IRBuilderBase::getInt8PtrTy(), llvm::FunctionType::getNumParams(), llvm::FunctionType::getParamType(), llvm::FunctionType::getReturnType(), and llvm::Type::isVoidTy().

Referenced by inferLibFuncAttributes(), and isFreeCall().

◆ isMallocLikeFn()

bool llvm::isMallocLikeFn ( const Value V,
const TargetLibraryInfo TLI,
bool  LookThroughBitCast = false 
)

Tests if a value is a call or invoke to a library function that allocates uninitialized memory (such as malloc).

Definition at line 239 of file MemoryBuiltins.cpp.

References getAllocationData(), and MallocLike.

Referenced by extractMallocCall(), getMallocArraySize(), and getMallocType().

◆ isMallocOrCallocLikeFn()

bool llvm::isMallocOrCallocLikeFn ( const Value V,
const TargetLibraryInfo TLI,
bool  LookThroughBitCast = false 
)

Tests if a value is a call or invoke to a library function that allocates memory similar to malloc or calloc.

Definition at line 253 of file MemoryBuiltins.cpp.

References getAllocationData(), and MallocOrCallocLike.

Referenced by llvm::BasicAAResult::getModRefInfo().

◆ isMask_32()

constexpr bool llvm::isMask_32 ( uint32_t  Value)
inlineconstexpr

Return true if the argument is a non-empty sequence of ones starting at the least significant bit with the remainder zero (32 bit version).

Ex. isMask_32(0x0000FFFFU) == true.

Definition at line 404 of file MathExtras.h.

Referenced by isShiftedMask_32().

◆ isMask_64()

constexpr bool llvm::isMask_64 ( uint64_t  Value)
inlineconstexpr

Return true if the argument is a non-empty sequence of ones starting at the least significant bit with the remainder zero (64 bit version).

Definition at line 410 of file MathExtras.h.

Referenced by isShiftedMask_64().

◆ isMathLibCallNoop()

bool llvm::isMathLibCallNoop ( const CallBase Call,
const TargetLibraryInfo TLI 
)

Check whether the given call has no side-effects.

Specifically checks for math routimes which sometimes set errno.

Definition at line 2396 of file ConstantFolding.cpp.

References F, llvm::TargetLibraryInfo::getLibFunc(), llvm::Value::getType(), llvm::ConstantFP::getValueAPF(), llvm::Type::isDoubleTy(), llvm::Type::isFloatTy(), and llvm::Type::isHalfTy().

Referenced by wouldInstructionBeTriviallyDead().

◆ isModAndRefSet()

LLVM_NODISCARD bool llvm::isModAndRefSet ( const ModRefInfo  MRI)
inline

◆ isModOrRefSet()

LLVM_NODISCARD bool llvm::isModOrRefSet ( const ModRefInfo  MRI)
inline

◆ isModSet()

LLVM_NODISCARD bool llvm::isModSet ( const ModRefInfo  MRI)
inline

◆ isMustSet()

LLVM_NODISCARD bool llvm::isMustSet ( const ModRefInfo  MRI)
inline

Definition at line 156 of file AliasAnalysis.h.

References NoModRef.

Referenced by instructionClobbersQuery().

◆ isNoAliasArgument()

bool llvm::isNoAliasArgument ( const Value V)

Return true if this is an argument with the noalias attribute.

Definition at line 874 of file AliasAnalysis.cpp.

Referenced by isIdentifiedFunctionLocal().

◆ isNoAliasCall()

bool llvm::isNoAliasCall ( const Value V)

Return true if this pointer is returned by a noalias function.

Definition at line 868 of file AliasAnalysis.cpp.

References NoAlias.

Referenced by computePointerICmp(), isIdentifiedFunctionLocal(), isIdentifiedObject(), isNonEscapingLocalObject(), and PointerMayBeCaptured().

◆ isNoAliasFn()

bool llvm::isNoAliasFn ( const Value V,
const TargetLibraryInfo TLI,
bool  LookThroughBitCast = false 
)

Tests if a value is a call or invoke to a function that returns a NoAlias pointer (including malloc/calloc/realloc/strdup-like functions).

Definition at line 229 of file MemoryBuiltins.cpp.

References hasNoAliasAttr(), and isAllocationFn().

Referenced by llvm::MemoryDependenceResults::getSimplePointerDependencyFrom().

◆ isNoModRef()

LLVM_NODISCARD bool llvm::isNoModRef ( const ModRefInfo  MRI)
inline

◆ isNoOpWithoutInvoke()

bool llvm::isNoOpWithoutInvoke ( EHPersonality  Pers)
inline

Return true if this personality may be safely removed if there are no invoke instructions remaining in the current function.

Definition at line 95 of file EHPersonalities.h.

References llvm_unreachable, and Unknown.

◆ isOnlyUsedInZeroEqualityComparison()

bool llvm::isOnlyUsedInZeroEqualityComparison ( const Instruction CxtI)

Definition at line 213 of file ValueTracking.cpp.

References llvm::Value::users().

Referenced by optimizeMemCmpConstantSize().

◆ isOverflowIntrinsicNoWrap()

bool llvm::isOverflowIntrinsicNoWrap ( const WithOverflowInst WO,
const DominatorTree DT 
)

Returns true if the arithmetic part of the WO 's result is used only along the paths control dependent on the computation not overflowing, WO being an <op>.with.overflow intrinsic.

Definition at line 4154 of file ValueTracking.cpp.

References assert(), llvm::DominatorTree::dominates(), llvm::BasicBlockEdge::isSingleEdge(), Results, and llvm::Value::users().

Referenced by MatchBinaryOp().

◆ isPotentiallyReachable() [1/2]

bool llvm::isPotentiallyReachable ( const BasicBlock From,
const BasicBlock To,
const DominatorTree DT = nullptr,
const LoopInfo LI = nullptr 
)

Determine whether block 'To' is reachable from 'From', returning true if uncertain.

Determine whether there is a path from From to To within a single function. Returns false only if we can prove that once 'From' has been reached then 'To' can not be executed. Conservatively returns true.

Definition at line 199 of file CFG.cpp.

References assert(), llvm::BasicBlock::getParent(), and isPotentiallyReachableFromMany().

◆ isPotentiallyReachable() [2/2]

bool llvm::isPotentiallyReachable ( const Instruction From,
const Instruction To,
const SmallPtrSetImpl< BasicBlock * > *  ExclusionSet = nullptr,
const DominatorTree DT = nullptr,
const LoopInfo LI = nullptr 
)

Determine whether instruction 'To' is reachable from 'From', without passing through any blocks in ExclusionSet, returning true if uncertain.

Determine whether there is a path from From to To within a single function. Returns false only if we can prove that once 'From' has been executed then 'To' can not be executed. Conservatively returns true.

This function is linear with respect to the number of blocks in the CFG, walking down successors from From to reach To, with a fixed threshold. Using DT or LI allows us to answer more quickly. LI reduces the cost of an entire loop of any number of blocks to be the same as the cost of a single block. DT reduces the cost by allowing the search to terminate when we find a block that dominates the block containing 'To'. DT is most useful on branchy code but not loops, and LI is most useful on code with loops but does not help on branchy code outside loops.

Definition at line 211 of file CFG.cpp.

References assert(), llvm::BasicBlock::end(), llvm::Function::getEntryBlock(), llvm::LoopInfoBase< BlockT, LoopT >::getLoopFor(), llvm::BasicBlock::getParent(), llvm::Instruction::getParent(), I, isPotentiallyReachableFromMany(), llvm::DominatorTree::isReachableFromEntry(), succ_begin(), and succ_end().

Referenced by InsertSafepointPoll().

◆ isPotentiallyReachableFromMany() [1/2]

bool llvm::isPotentiallyReachableFromMany ( SmallVectorImpl< BasicBlock * > &  Worklist,
BasicBlock StopBB,
const DominatorTree DT = nullptr,
const LoopInfo LI = nullptr 
)

Determine whether there is at least one path from a block in 'Worklist' to 'StopBB', returning true if uncertain.

Determine whether there is a path from at least one block in Worklist to StopBB within a single function. Returns false only if we can prove that once any block in 'Worklist' has been reached then 'StopBB' can not be executed. Conservatively returns true.

Referenced by isPotentiallyReachable().

◆ isPotentiallyReachableFromMany() [2/2]

bool llvm::isPotentiallyReachableFromMany ( SmallVectorImpl< BasicBlock * > &  Worklist,
BasicBlock StopBB,
const SmallPtrSetImpl< BasicBlock * > *  ExclusionSet,
const DominatorTree DT = nullptr,
const LoopInfo LI = nullptr 
)

Determine whether there is at least one path from a block in 'Worklist' to 'StopBB' without passing through any blocks in 'ExclusionSet', returning true if uncertain.

Determine whether there is a path from at least one block in Worklist to StopBB within a single function without passing through any of the blocks in 'ExclusionSet'. Returns false only if we can prove that once any block in 'Worklist' has been reached then 'StopBB' can not be executed. Conservatively returns true.

Definition at line 123 of file CFG.cpp.

References llvm::DominatorTree::dominates(), getOutermostLoop(), llvm::DominatorTree::isReachableFromEntry(), succ_begin(), and succ_end().

◆ isPowerOf2_32()

constexpr bool llvm::isPowerOf2_32 ( uint32_t  Value)
inlineconstexpr

◆ isPowerOf2_64()

constexpr bool llvm::isPowerOf2_64 ( uint64_t  Value)
inlineconstexpr

Return true if the argument is a power of two > 0 (64 bit edition.)

Definition at line 433 of file MathExtras.h.

Referenced by alignAddr(), llvm::slpvectorizer::BoUpSLP::computeMinimumValueSizes(), computeRecurrenceType(), getNewAlignmentDiff(), and tryToShorten().

◆ isPrefixedHexStyle()

bool llvm::isPrefixedHexStyle ( HexPrintStyle  S)

◆ isReallocLikeFn() [1/2]

bool llvm::isReallocLikeFn ( const Function F,
const TargetLibraryInfo TLI 
)

Tests if a function is a call or invoke to a library function that reallocates memory (e.g., realloc).

Tests if a functions is a call or invoke to a library function that reallocates memory (e.g., realloc).

Definition at line 275 of file MemoryBuiltins.cpp.

References F, getAllocationDataForFunction(), and ReallocLike.

◆ isReallocLikeFn() [2/2]

bool llvm::isReallocLikeFn ( const Value V,
const TargetLibraryInfo TLI,
bool  LookThroughBitCast = false 
)

Tests if a value is a call or invoke to a library function that reallocates memory (e.g., realloc).

Definition at line 268 of file MemoryBuiltins.cpp.

References getAllocationData(), and ReallocLike.

Referenced by inferLibFuncAttributes().

◆ isRefSet()

LLVM_NODISCARD bool llvm::isRefSet ( const ModRefInfo  MRI)
inline

◆ isReleaseOrStronger()

bool llvm::isReleaseOrStronger ( AtomicOrdering  ao)
inline

Definition at line 131 of file AtomicOrdering.h.

References isAtLeastOrStrongerThan(), and Release.

◆ isSafeToDestroyConstant()

bool llvm::isSafeToDestroyConstant ( const Constant C)

It is safe to destroy a constant iff it is only used by constants itself.

Note that constants cannot be cyclic, so this test is pretty easy to implement recursively.

Definition at line 45 of file GlobalStatus.cpp.

References isSafeToDestroyConstant().

Referenced by analyzeGlobalAux(), CleanupConstantGlobalUsers(), CleanupPointerRootUsers(), eliminateAvailableExternally(), isSafeSROAElementUse(), isSafeToDestroyConstant(), and llvm::GlobalDCEPass::run().

◆ isSafeToExpand()

bool llvm::isSafeToExpand ( const SCEV S,
ScalarEvolution SE 
)

Return true if the given expression is safe to expand in the sense that all materialized values are safe to speculate anywhere their operands are defined.

Definition at line 2417 of file ScalarEvolutionExpander.cpp.

References visitAll().

Referenced by isSafeToExpandAt().

◆ isSafeToExpandAt()

bool llvm::isSafeToExpandAt ( const SCEV S,
const Instruction InsertionPoint,
ScalarEvolution SE 
)

Return true if the given expression is safe to expand in the sense that all materialized values are defined and safe to speculate at the specified location and their operands are defined at this location.

Definition at line 2423 of file ScalarEvolutionExpander.cpp.

References llvm::ScalarEvolution::dominates(), llvm::Instruction::getParent(), llvm::BasicBlock::getTerminator(), isSafeToExpand(), llvm::User::operand_values(), and llvm::ScalarEvolution::properlyDominates().

◆ isSafeToLoadUnconditionally() [1/2]

bool llvm::isSafeToLoadUnconditionally ( Value V,
Type Ty,
unsigned  Align,
const DataLayout DL,
Instruction ScanFrom = nullptr,
const DominatorTree DT = nullptr 
)

Return true if we know that executing a load from this value cannot trap.

If DT and ScanFrom are specified this method performs context-sensitive analysis and returns true if it is safe to load immediately before ScanFrom.

If it is not obviously safe to load from the specified pointer, we do a quick local scan of the basic block containing ScanFrom, to determine if the address is already accessed.

Definition at line 317 of file Loads.cpp.

References llvm::DataLayout::getIndexTypeSizeInBits(), llvm::Value::getType(), llvm::DataLayout::getTypeStoreSize(), and isSafeToLoadUnconditionally().

◆ isSafeToLoadUnconditionally() [2/2]

bool llvm::isSafeToLoadUnconditionally ( Value V,
unsigned  Align,
APInt &  Size,
const DataLayout DL,
Instruction ScanFrom = nullptr,
const DominatorTree DT = nullptr 
)

Return true if we know that executing a load from this value cannot trap.

Check if executing a load of this pointer value cannot trap.

If DT and ScanFrom are specified this method performs context-sensitive analysis and returns true if it is safe to load immediately before ScanFrom.

If it is not obviously safe to load from the specified pointer, we do a quick local scan of the basic block containing ScanFrom, to determine if the address is already accessed.

If DT and ScanFrom are specified this method performs context-sensitive analysis and returns true if it is safe to load immediately before ScanFrom.

If it is not obviously safe to load from the specified pointer, we do a quick local scan of the basic block containing ScanFrom, to determine if the address is already accessed.

This uses the pointee type to determine how many bytes need to be safe to load from the pointer.

Definition at line 201 of file Loads.cpp.

References AreEquivalentAddressValues(), assert(), llvm::BasicBlock::begin(), llvm::DataLayout::getABITypeAlignment(), llvm::PointerType::getElementType(), llvm::Instruction::getParent(), GetPointerBaseWithConstantOffset(), llvm::Type::getPointerElementType(), llvm::DataLayout::getPrefTypeAlignment(), llvm::Value::getType(), llvm::DataLayout::getTypeAllocSize(), llvm::DataLayout::getTypeStoreSize(), isDereferenceableAndAlignedPointer(), isPowerOf2_32(), and llvm::Value::stripPointerCasts().

Referenced by canMoveAboveCall(), isSafePHIToSpeculate(), isSafeSelectToSpeculate(), isSafeToLoadUnconditionally(), and llvm::InstCombiner::visitLoadInst().

◆ isSafeToSpeculativelyExecute()

bool llvm::isSafeToSpeculativelyExecute ( const Value V,
const Instruction CtxI = nullptr,
const DominatorTree DT = nullptr 
)

Return true if the instruction does not have any effects besides calculating the result and does not have undefined behavior.

This method never returns true for an instruction that returns true for mayHaveSideEffects; however, this method also does some other checks in addition. It checks for undefined behavior, like dividing by zero or loading from an invalid pointer (but not for undefined results, like a shift with a shift amount larger than the width of the result). It checks for malloc and alloca because speculatively executing them might cause a memory leak. It also returns false for instructions related to control flow, specifically terminators and PHI nodes.

If the CtxI is specified this method performs context-sensitive analysis and returns true if it is safe to execute the instruction immediately before the CtxI.

If the CtxI is NOT specified this method only looks at the instruction itself and its operands, so if this method returns true, it is safe to move the instruction as long as the correct dominance relationships for the operands and users hold.

This method can return true for instructions that read memory; for such instructions, moving them may change the resulting value.

Definition at line 3868 of file ValueTracking.cpp.

References llvm::LoadInst::getAlignment(), llvm::Module::getDataLayout(), llvm::Instruction::getFunction(), llvm::Instruction::getModule(), llvm::User::getNumOperands(), llvm::Operator::getOpcode(), llvm::User::getOperand(), llvm::LoadInst::getPointerOperand(), llvm::Value::getType(), llvm::Function::hasFnAttribute(), isDereferenceableAndAlignedPointer(), llvm::LoadInst::isUnordered(), llvm::PatternMatch::m_APInt(), and llvm::PatternMatch::match().

Referenced by llvm::IVUsers::AddUsersImpl(), appendSpeculatableOperands(), CanPHITrans(), ComputeSpeculationCost(), DominatesMergePoint(), FoldBranchToCommonDest(), HoistThenElseCodeToIf(), isEphemeralValueOf(), isHoistable(), isSafeToExecuteUnconditionally(), isValidAssumeForContext(), llvm::Loop::makeLoopInvariant(), mayBeMemoryDependent(), shouldSpeculateInstrs(), llvm::JumpThreadingPass::SimplifyPartiallyRedundantLoad(), SinkCommonCodeFromPredecessors(), SpeculativelyExecuteBB(), and llvm::InstCombiner::visitCallInst().

◆ isSafeToUnrollAndJam()

bool llvm::isSafeToUnrollAndJam ( Loop L,
ScalarEvolution SE,
DominatorTree DT,
DependenceInfo DI 
)

◆ isScopedEHPersonality()

bool llvm::isScopedEHPersonality ( EHPersonality  Pers)
inline

Returns true if this personality uses scope-style EH IR instructions: catchswitch, catchpad/ret, and cleanuppad/ret.

Definition at line 79 of file EHPersonalities.h.

References CoreCLR, llvm_unreachable, MSVC_CXX, MSVC_Win64SEH, MSVC_X86SEH, and Wasm_CXX.

Referenced by llvm::LoopSafetyInfo::computeBlockColors(), InlineFunction(), isUsingScopeBasedEH(), and llvm::EscapeEnumerator::Next().

◆ isShiftedInt()

template<unsigned N, unsigned S>
constexpr bool llvm::isShiftedInt ( int64_t  x)
inlineconstexpr

Checks if a signed integer is an N bit number shifted left by S.

Definition at line 314 of file MathExtras.h.

References N.

◆ isShiftedMask_32()

constexpr bool llvm::isShiftedMask_32 ( uint32_t  Value)
inlineconstexpr

Return true if the argument contains a non-empty sequence of ones with the remainder zero (32 bit version.) Ex.

isShiftedMask_32(0x0000FF00U) == true.

Definition at line 416 of file MathExtras.h.

References isMask_32().

◆ isShiftedMask_64()

constexpr bool llvm::isShiftedMask_64 ( uint64_t  Value)
inlineconstexpr

Return true if the argument contains a non-empty sequence of ones with the remainder zero (64 bit version.)

Definition at line 422 of file MathExtras.h.

References isMask_64().

◆ isShiftedUInt()

template<unsigned N, unsigned S>
constexpr bool llvm::isShiftedUInt ( uint64_t  x)
inlineconstexpr

Checks if a unsigned integer is an N bit number shifted left by S.

Definition at line 354 of file MathExtras.h.

References N.

◆ isSplatValue()

bool llvm::isSplatValue ( const Value V,
unsigned  Depth = 0 
)

Return true if the input value is known to be a vector with all identical elements (potentially including undefined elements).

This may be more powerful than the related getSplatValue() because it is not limited by finding a scalar source value to a splatted vector.

Definition at line 330 of file VectorUtils.cpp.

References assert(), llvm::Constant::getSplatValue(), llvm::Value::getType(), isSplatValue(), llvm::PatternMatch::m_BinOp(), llvm::PatternMatch::m_Constant(), llvm::PatternMatch::m_Select(), llvm::PatternMatch::m_ShuffleVector(), llvm::PatternMatch::m_Value(), llvm::PatternMatch::match(), MaxDepth, X(), and Y().

Referenced by isSplatValue().

◆ isStatepoint() [1/3]

bool llvm::isStatepoint ( const CallBase Call)

◆ isStatepoint() [2/3]

bool llvm::isStatepoint ( const Value V)

Definition at line 32 of file Statepoint.cpp.

References isStatepoint().

◆ isStatepoint() [3/3]

bool llvm::isStatepoint ( const Value V)

Definition at line 26 of file Statepoint.cpp.

References isStatepoint().

◆ isStatepointDirectiveAttr()

bool llvm::isStatepointDirectiveAttr ( Attribute  Attr)

Return true if the Attr is an attribute that is a statepoint directive.

Definition at line 54 of file Statepoint.cpp.

References llvm::Attribute::hasAttribute().

Referenced by legalizeCallAttributes().

◆ isStrongerThan()

bool llvm::isStrongerThan ( AtomicOrdering  ao,
AtomicOrdering  other 
)
inline

Returns true if ao is stronger than other as defined by the AtomicOrdering lattice, which is based on C++'s definition.

Definition at line 89 of file AtomicOrdering.h.

Referenced by isStrongerThanMonotonic(), and isStrongerThanUnordered().

◆ isStrongerThanMonotonic()

bool llvm::isStrongerThanMonotonic ( AtomicOrdering  ao)
inline

Definition at line 123 of file AtomicOrdering.h.

References isStrongerThan(), and Monotonic.

Referenced by llvm::AliasSetTracker::add().

◆ isStrongerThanUnordered()

bool llvm::isStrongerThanUnordered ( AtomicOrdering  ao)
inline

◆ isTriviallyVectorizable()

bool llvm::isTriviallyVectorizable ( Intrinsic::ID  ID)

Identify if the intrinsic is trivially vectorizable.

Return true if all of the intrinsic's arguments and return type are scalars for the scalar form of the intrinsic, and vectors for the vector form of the intrinsic (except operands that are marked as always being scalar by hasVectorInstrinsicScalarOpd).

This method returns true if the intrinsic's argument types are all scalars for the scalar form of the intrinsic and all vectors (or scalars handled by hasVectorInstrinsicScalarOpd) for the vector form of the intrinsic.

Definition at line 43 of file VectorUtils.cpp.

Referenced by getVectorIntrinsicIDForCall(), and isTriviallyScalariable().

◆ isUInt() [1/2]

template<unsigned N>
constexpr std::enable_if<(N< 64), bool >::type llvm::isUInt ( uint64_t  X)
inlineconstexpr

Checks if an unsigned integer fits into the given bit width.

This is written as two functions rather than as simply

return N >= 64 || X < (UINT64_C(1) << N);

to keep MSVC from (incorrectly) warning on isUInt<64> that we're shifting left too many places.

Definition at line 331 of file MathExtras.h.

References N, and X().

◆ isUInt() [2/2]

constexpr bool ::type llvm::isUInt ( uint64_t  X)

Definition at line 337 of file MathExtras.h.

◆ isUInt< 16 >()

template<>
constexpr bool llvm::isUInt< 16 > ( uint64_t  x)
inlineconstexpr

Definition at line 345 of file MathExtras.h.

◆ isUInt< 32 >()

template<>
constexpr bool llvm::isUInt< 32 > ( uint64_t  x)
inlineconstexpr

Definition at line 348 of file MathExtras.h.

◆ isUInt< 8 >()

template<>
constexpr bool llvm::isUInt< 8 > ( uint64_t  x)
inlineconstexpr

Definition at line 342 of file MathExtras.h.

◆ isUIntN()

bool llvm::isUIntN ( unsigned  N,
uint64_t  x 
)
inline

Checks if an unsigned integer fits into the given (dynamic) bit width.

Definition at line 392 of file MathExtras.h.

References maxUIntN(), and N.

Referenced by llvm::ConstantInt::isValueValidForType(), and lowerObjectSizeCall().

◆ isUniformLoop()

static bool llvm::isUniformLoop ( Loop Lp,
Loop OuterLp 
)
static

◆ isUniformLoopNest()

static bool llvm::isUniformLoopNest ( Loop Lp,
Loop OuterLp 
)
static

Definition at line 369 of file LoopVectorizationLegality.cpp.

References isUniformLoop(), and isUniformLoopNest().

Referenced by isUniformLoopNest().

◆ isValidAsAccessGroup()

bool llvm::isValidAsAccessGroup ( MDNode AccGroup)

Return whether an MDNode might represent an access group.

Access group metadata nodes have to be distinct and empty. Being always-empty ensures that it never needs to be changed (which – because MDNodes are designed immutable – would require creating a new MDNode). Note that this is not a sufficient condition: not every distinct and empty NDNode is representing an access group.

Definition at line 967 of file LoopInfo.cpp.

Referenced by addToAccessGroupList(), intersectAccessGroups(), and llvm::Loop::isAnnotatedParallel().

◆ isValidAssumeForContext()

bool llvm::isValidAssumeForContext ( const Instruction I,
const Instruction CxtI,
const DominatorTree DT = nullptr 
)

Return true if it is valid to use the assumptions provided by an assume intrinsic, I, at the point in the control-flow identified by the context instruction, CxtI.

Definition at line 525 of file ValueTracking.cpp.

References llvm::DominatorTree::dominates(), llvm::BasicBlock::end(), llvm::Instruction::getParent(), llvm::BasicBlock::getSinglePredecessor(), I, isAssumeLikeIntrinsic(), isEphemeralValueOf(), and isSafeToSpeculativelyExecute().

Referenced by computeKnownBitsFromAssume(), llvm::AlignmentFromAssumptionsPass::processAssumption(), and llvm::InstCombiner::visitCallInst().

◆ isValidAtomicOrdering()

template<typename Int >
bool llvm::isValidAtomicOrdering ( Int  I)
inline

Definition at line 74 of file AtomicOrdering.h.

References I, NotAtomic, and SequentiallyConsistent.

◆ isValidAtomicOrderingCABI()

template<typename Int >
bool llvm::isValidAtomicOrderingCABI ( Int  I)
inline

Definition at line 44 of file AtomicOrdering.h.

References I, relaxed, and seq_cst.

◆ joinErrors()

Error llvm::joinErrors ( Error  E1,
Error  E2 
)
inline

Concatenate errors.

The resulting Error is unchecked, and contains the ErrorInfo(s), if any, contained in E1, followed by the ErrorInfo(s), if any, contained in E2.

Definition at line 423 of file Error.h.

Referenced by llvm::FileCheckPatternContext::defineCmdlineVariables(), llvm::FileCheckASTBinop::eval(), llvm::pdb::NamedStreamMap::load(), readGSIHashBuckets(), readGSIHashRecords(), llvm::pdb::readSparseBitVector(), llvm::pdb::InfoStream::reload(), llvm::pdb::PublicsStream::reload(), and llvm::pdb::writeSparseBitVector().

◆ left_justify()

FormattedString llvm::left_justify ( StringRef  Str,
unsigned  Width 
)
inline

left_justify - append spaces after string so total output is Width characters.

If Str is larger that Width, full string is written with no padding.

Definition at line 144 of file Format.h.

References llvm::FormattedString::JustifyLeft.

Referenced by llvm::DWARFUnitIndex::dump(), and llvm::DebugCounter::print().

◆ lintFunction()

void llvm::lintFunction ( const Function F)

lintFunction - Check a function for errors, printing messages on stderr.

Parameters
FThe function to be checked

Definition at line 739 of file Lint.cpp.

References llvm::legacy::FunctionPassManager::add(), assert(), F, and llvm::legacy::FunctionPassManager::run().

◆ lintModule()

void llvm::lintModule ( const Module M)

Check a module.

lintModule - Check a module for errors, printing messages on stderr.

This should only be used for debugging, because it plays games with PassManagers and stuff.

Parameters
MThe module to be checked

Definition at line 751 of file Lint.cpp.

References llvm::legacy::PassManager::add(), and llvm::legacy::PassManager::run().

◆ llvm_execute_on_thread()

void llvm::llvm_execute_on_thread ( void(*)(void *)  UserFn,
void *  UserData,
unsigned  RequestedStackSize = 0 
)

llvm_execute_on_thread - Execute the given UserFn on a separate thread, passing it the provided UserData and waits for thread completion.

This function does not guarantee that the code will actually be executed on a separate thread or honoring the requested stack size, but tries to do so where system support is available.

Parameters
UserFn- The callback to execute.
UserData- An argument to pass to the callback function.
RequestedStackSize- If non-zero, a requested size (in bytes) for the thread stack.

Referenced by llvm::CrashRecoveryContext::RunSafelyOnThread().

◆ llvm_is_multithreaded()

bool llvm::llvm_is_multithreaded ( )

◆ llvm_shutdown()

void llvm::llvm_shutdown ( )

llvm_shutdown - Deallocate and destroy all ManagedStatic variables.

Definition at line 79 of file ManagedStatic.cpp.

References llvm::ManagedStaticBase::destroy(), getManagedStaticMutex(), and StaticList.

Referenced by LLVMShutdown(), llvm::InitLLVM::~InitLLVM(), and llvm::llvm_shutdown_obj::~llvm_shutdown_obj().

◆ llvm_unreachable_internal()

void llvm::llvm_unreachable_internal ( const char msg = nullptr,
const char file = nullptr,
unsigned  line = 0 
)

This function calls abort(), and prints the optional message to stderr.

Use the llvm_unreachable macro (that adds location info), instead of calling this function directly.

Definition at line 198 of file ErrorHandling.cpp.

References dbgs(), and file.

◆ Lo_32()

constexpr uint32_t llvm::Lo_32 ( uint64_t  Value)
inlineconstexpr

Return the low 32 bits of a 64 bit value.

Definition at line 288 of file MathExtras.h.

Referenced by KnuthDiv().

◆ LoadOpt()

static cl::opt< PluginLoader, false, cl::parser< std::string > > llvm::LoadOpt ( "load"  ,
cl::ZeroOrMore  ,
cl::value_desc("pluginfilename")  ,
cl::desc("Load the specified plugin")   
)
static

◆ Log2()

double llvm::Log2 ( double  Value)
inline

Return the log base 2 of the specified value.

Definition at line 527 of file MathExtras.h.

Referenced by llvm::InstCombiner::visitFMul().

◆ Log2_32()

unsigned llvm::Log2_32 ( uint32_t  Value)
inline

◆ Log2_32_Ceil()

unsigned llvm::Log2_32_Ceil ( uint32_t  Value)
inline

Return the ceil log base 2 of the specified value, 32 if the value is zero.

(32 bit edition). Ex. Log2_32_Ceil(32) == 5, Log2_32_Ceil(1) == 0, Log2_32_Ceil(6) == 3

Definition at line 551 of file MathExtras.h.

References countLeadingZeros().

Referenced by llvm::MVT::getPow2VectorType(), SimplifyShift(), TypeSizeToSizeIndex(), and llvm::InstCombiner::visitCallInst().

◆ Log2_64()

unsigned llvm::Log2_64 ( uint64_t  Value)
inline

Return the floor log base 2 of the specified value, -1 if the value is zero.

(64 bit edition.)

Definition at line 544 of file MathExtras.h.

References countLeadingZeros().

Referenced by llvm::parallel::detail::parallel_sort(), and SaturatingMultiply().

◆ Log2_64_Ceil()

unsigned llvm::Log2_64_Ceil ( uint64_t  Value)
inline

Return the ceil log base 2 of the specified value, 64 if the value is zero.

(64 bit edition.)

Definition at line 557 of file MathExtras.h.

References countLeadingZeros().

Referenced by buildFrameType(), llvm::ArrayRecycler< T, Align >::Capacity::get(), and llvm::raw_ostream::operator<<().

◆ logAllUnhandledErrors()

void llvm::logAllUnhandledErrors ( Error  E,
raw_ostream OS,
Twine  ErrorBanner = {} 
)

Log all errors (if any) in E to OS.

If there are any errors, ErrorBanner will be printed before the first one is logged. A newline will be printed after each error.

This function is compatible with the helpers from Support/WithColor.h. You can pass any of them as the OS. Please consider using them instead of including 'error: ' in the ErrorBanner.

This is useful in the base level of your program to allow clean termination (allowing clean deallocation of resources, etc.), while reporting error information to the user.

Definition at line 61 of file Error.cpp.

References handleAllErrors(), and llvm::ErrorInfoBase::log().

Referenced by doImportingForModule(), llvm::LTOModule::isThinLTO(), llvm::ThinLTOCodeGenerator::linkCombinedIndex(), llvm::FileCheckPattern::parsePattern(), llvm::FileCheck::ReadCheckFile(), and report_fatal_error().

◆ LoopRotation()

bool llvm::LoopRotation ( Loop L,
LoopInfo LI,
const TargetTransformInfo TTI,
AssumptionCache AC,
DominatorTree DT,
ScalarEvolution SE,
MemorySSAUpdater MSSAU,
const SimplifyQuery SQ,
bool  RotationOnly = true,
unsigned  Threshold = unsigned(-1),
bool  IsUtilMode = true 
)

Convert a loop into a loop with bottom test.

The utility to convert a loop into a loop with bottom test.

It may perform loop latch simplication as well if the flag RotationOnly is false. The flag Threshold represents the size threshold of the loop header. If the loop header's size exceeds the threshold, the loop rotation will give up. The flag IsUtilMode controls the heuristic used in the LoopRotation. If it is true, the profitability heuristic will be ignored.

Definition at line 676 of file LoopRotationUtils.cpp.

References llvm::MemorySSAUpdater::getMemorySSA(), Threshold, llvm::MemorySSA::verifyMemorySSA(), and VerifyMemorySSA.

Referenced by llvm::LoopRotatePass::run().

◆ lostFractionThroughTruncation()

static lostFraction llvm::lostFractionThroughTruncation ( const APFloatBase::integerPart *  parts,
unsigned int  partCount,
unsigned int  bits 
)
static

Definition at line 457 of file APFloat.cpp.

References bits.

Referenced by shiftRight().

◆ LowerDbgDeclare()

bool llvm::LowerDbgDeclare ( Function F)

Lowers llvm.dbg.declare intrinsics into appropriate set of llvm.dbg.value intrinsics.

LowerDbgDeclare - Lowers llvm.dbg.declare intrinsics into appropriate set of llvm.dbg.value intrinsics.

Definition at line 1405 of file Local.cpp.

References llvm::DIExpression::append(), ConvertDebugDeclareToDebugValue(), llvm::Instruction::eraseFromParent(), F, llvm::DbgDeclareInst::getAddress(), getDebugValueLoc(), llvm::DbgVariableIntrinsic::getExpression(), llvm::DbgVariableIntrinsic::getVariable(), I, isArray(), llvm::Value::users(), and llvm::Value::uses().

Referenced by llvm::coro::buildCoroutineFrame(), and combineInstructionsOverFunction().

◆ lowerObjectSizeCall()

Value * llvm::lowerObjectSizeCall ( IntrinsicInst ObjectSize,
const DataLayout DL,
const TargetLibraryInfo TLI,
bool  MustSucceed 
)

◆ Make_64()

constexpr uint64_t llvm::Make_64 ( uint32_t  High,
uint32_t  Low 
)
inlineconstexpr

Make a 64-bit integer from a high / low pair of 32-bit integers.

Definition at line 293 of file MathExtras.h.

Referenced by KnuthDiv().

◆ make_error()

template<typename ErrT , typename... ArgTs>
Error llvm::make_error ( ArgTs &&...  Args)

Make a Error instance representing failure using the given error info type.

Definition at line 330 of file Error.h.

◆ make_error_code()

std::error_code llvm::make_error_code ( errc  E)
inline

◆ MakeErrMsg()

bool llvm::MakeErrMsg ( std::string *  ErrMsg,
const std::string &  prefix 
)

◆ makeFollowupLoopID()

Optional< MDNode * > llvm::makeFollowupLoopID ( MDNode OrigLoopID,
ArrayRef< StringRef >  FollowupAttrs,
const char InheritOptionsAttrsPrefix = "",
bool  AlwaysNew = false 
)

Create a new loop identifier for a loop created from a loop transformation.

Parameters
OrigLoopIDThe loop ID of the loop before the transformation.
FollowupAttrsList of attribute names that contain attributes to be added to the new loop ID.
InheritOptionsAttrsPrefixSelects which attributes should be inherited from the original loop. The following values are considered: nullptr : Inherit all attributes from OrigLoopID. "" : Do not inherit any attribute from OrigLoopID; only use those specified by a followup attribute. "<prefix>": Inherit all attributes except those which start with <prefix>; commonly used to remove metadata for the applied transformation.
AlwaysNewIf true, do not try to reuse OrigLoopID and never return None.
Returns
The loop ID for the after-transformation loop. The following values can be returned: None : No followup attribute was found; it is up to the transformation to choose attributes that make sense. OrigLoopID: The original identifier can be reused. nullptr : The new loop has no attributes. MDNode* : A new unique loop identifier.

Definition at line 250 of file LoopUtils.cpp.

References assert(), findOptionMDForLoopID(), llvm::MDOperand::get(), llvm::MDNode::get(), llvm::MDNode::getContext(), llvm::MDNode::getNumOperands(), llvm::MDNode::getOperand(), None, llvm::MDNode::operands(), and llvm::MDNode::replaceOperandWith().

Referenced by CloneLoopBlocks(), llvm::InnerLoopVectorizer::createVectorizedLoopSkeleton(), llvm::LoopVectorizePass::processLoop(), tryToUnrollAndJamLoop(), and tryToUnrollLoop().

◆ makeGuardControlFlowExplicit()

void llvm::makeGuardControlFlowExplicit ( Function DeoptIntrinsic,
CallInst Guard 
)

◆ makePostTransformationMetadata()

llvm::MDNode * llvm::makePostTransformationMetadata ( llvm::LLVMContext Context,
MDNode OrigLoopID,
llvm::ArrayRef< llvm::StringRef >  RemovePrefixes,
llvm::ArrayRef< llvm::MDNode * >  AddAttrs 
)

Create a new LoopID after the loop has been transformed.

This can be used when no follow-up loop attributes are defined (llvm::makeFollowupLoopID returning None) to stop transformations to be applied again.

Parameters
ContextThe LLVMContext in which to create the new LoopID.
OrigLoopIDThe original LoopID; can be nullptr if the original loop has no LoopID.
RemovePrefixesRemove all loop attributes that have these prefixes. Use to remove metadata of the transformation that has been applied.
AddAttrsAdd these loop attributes to the new LoopID.
Returns
A new LoopID that can be applied using Loop::setLoopID().

Referenced by llvm::LoopVectorizeHints::setAlreadyVectorized(), and llvm::Loop::setLoopAlreadyUnrolled().

◆ MapMetadata() [1/2]

MDNode * llvm::MapMetadata ( const MDNode MD,
ValueToValueMapTy VM,
RemapFlags  Flags = RF_None,
ValueMapTypeRemapper TypeMapper = nullptr,
ValueMaterializer Materializer = nullptr 
)
inline

Version of MapMetadata with type safety for MDNode.

Definition at line 235 of file ValueMapper.h.

References llvm::ValueMapper::mapMDNode().

◆ MapMetadata() [2/2]

Metadata * llvm::MapMetadata ( const Metadata MD,
ValueToValueMapTy VM,
RemapFlags  Flags = RF_None,
ValueMapTypeRemapper TypeMapper = nullptr,
ValueMaterializer Materializer = nullptr 
)
inline

Lookup or compute a mapping for a piece of metadata.

Compute and memoize a mapping for MD.

  1. If MD is mapped, return it.
  2. Else if RF_NoModuleLevelChanges or MD is an MDString, return MD.
  3. Else if MD is a ConstantAsMetadata, call MapValue() and re-wrap its return (returning nullptr on nullptr).
  4. Else, MD is an MDNode. These are remapped, along with their transitive operands. Distinct nodes are duplicated or moved depending on RF_MoveDistinctNodes. Uniqued nodes are remapped like constants.
Note
LocalAsMetadata is completely unsupported by MapMetadata. Instead, use MapValue() with its wrapping MetadataAsValue instance.

Definition at line 227 of file ValueMapper.h.

References llvm::ValueMapper::mapMetadata().

Referenced by CloneFunctionInto(), and CloneModule().

◆ MapValue() [1/2]

Constant * llvm::MapValue ( const Constant V,
ValueToValueMapTy VM,
RemapFlags  Flags = RF_None,
ValueMapTypeRemapper TypeMapper = nullptr,
ValueMaterializer Materializer = nullptr 
)
inline

Version of MapValue with type safety for Constant.

Definition at line 271 of file ValueMapper.h.

References llvm::ValueMapper::mapConstant().

◆ MapValue() [2/2]

Value * llvm::MapValue ( const Value V,
ValueToValueMapTy VM,
RemapFlags  Flags = RF_None,
ValueMapTypeRemapper TypeMapper = nullptr,
ValueMaterializer Materializer = nullptr 
)
inline

Look up or compute a value in the value map.

Return a mapped value for a function-local value (Argument, Instruction, BasicBlock), or compute and memoize a value for a Constant.

  1. If V is in VM, return the result.
  2. Else if V can be materialized with Materializer, do so, memoize it in VM, and return it.
  3. Else if V is a function-local value, return nullptr.
  4. Else if V is a GlobalValue, return nullptr or V depending on RF_NullMapMissingGlobalValues.
  5. Else if V is a MetadataAsValue wrapping a LocalAsMetadata, recurse on the local SSA value, and return nullptr or "metadata !{}" on missing depending on RF_IgnoreMissingValues.
  6. Else if V is a MetadataAsValue, rewrap the return of MapMetadata().
  7. Else, compute the equivalent constant, and return it.

Definition at line 205 of file ValueMapper.h.

References llvm::ValueMapper::mapValue().

Referenced by CloneAndPruneIntoFromInst(), CloneFunctionInto(), and CloneModule().

◆ mapWindowsError()

std::error_code llvm::mapWindowsError ( unsigned  EV)

◆ MaskedValueIsZero()

bool llvm::MaskedValueIsZero ( const Value V,
const APInt &  Mask,
const DataLayout DL,
unsigned  Depth = 0,
AssumptionCache AC = nullptr,
const Instruction CxtI = nullptr,
const DominatorTree DT = nullptr,
bool  UseInstrInfo = true 
)

Return true if 'V & Mask' is known to be zero.

We use this predicate to simplify operations downstream. Mask is known to be zero for bits that V cannot have.

This function is defined on values with integer type, values with pointer type, and vectors of integers. In the case where V is a vector, the mask, known zero, and known one values are the same width as the vector element, and the bit is set only if it is true for all of the elements in the vector.

Definition at line 288 of file ValueTracking.cpp.

References safeCxtI().

Referenced by canEvaluateShifted(), getAlternateBinop(), llvm::InstCombiner::MaskedValueIsZero(), and SimplifyOrInst().

◆ maskIsAllOneOrUndef()

bool llvm::maskIsAllOneOrUndef ( Value Mask)

Given a mask vector of the form <Y x i1>, Return true if all of the elements of this predicate mask are true or undef.

That is, return true if all lanes can be assumed active.

Definition at line 767 of file VectorUtils.cpp.

References I.

◆ maskIsAllZeroOrUndef()

bool llvm::maskIsAllZeroOrUndef ( Value Mask)

Given a mask vector of the form <Y x i1>, Return true if all of the elements of this predicate mask are false or undef.

That is, return true if all lanes can be assumed inactive.

Definition at line 750 of file VectorUtils.cpp.

References I.

Referenced by simplifyIntrinsic().

◆ maskLeadingOnes()

template<typename T >
T llvm::maskLeadingOnes ( unsigned  N)

Create a bitmask with the N left-most bits set to 1, and all other bits set to 0.

Only unsigned types are allowed.

Definition at line 220 of file MathExtras.h.

References N.

◆ maskLeadingZeros()

template<typename T >
T llvm::maskLeadingZeros ( unsigned  N)

Create a bitmask with the N left-most bits set to 0, and all other bits set to 1.

Only unsigned types are allowed.

Definition at line 232 of file MathExtras.h.

References N.

◆ maskTrailingOnes()

template<typename T >
T llvm::maskTrailingOnes ( unsigned  N)

Create a bitmask with the N right-most bits set to 1, and all other bits set to 0.

Only unsigned types are allowed.

Definition at line 211 of file MathExtras.h.

References assert(), and N.

◆ maskTrailingZeros()

template<typename T >
T llvm::maskTrailingZeros ( unsigned  N)

Create a bitmask with the N right-most bits set to 0, and all other bits set to 1.

Only unsigned types are allowed.

Definition at line 226 of file MathExtras.h.

References N.

◆ matchDecomposedSelectPattern()

SelectPatternResult llvm::matchDecomposedSelectPattern ( CmpInst CmpI,
Value TrueVal,
Value FalseVal,
Value *&  LHS,
Value *&  RHS,
Instruction::CastOps CastOp = nullptr,
unsigned  Depth = 0 
)

Determine the pattern that a select with the given compare as its predicate and given values as its true/false operands would match.

Definition at line 5065 of file ValueTracking.cpp.

References llvm::Instruction::getFastMathFlags(), llvm::User::getOperand(), llvm::CmpInst::getPredicate(), llvm::Value::getType(), llvm::CmpInst::isEquality(), lookThroughCast(), llvm::FastMathFlags::setNoSignedZeros(), SPF_UNKNOWN, and SPNB_NA.

Referenced by matchSelectPattern(), and matchSelectWithOptionalNotCond().

◆ matchPassManager()

static bool llvm::matchPassManager ( StringRef  PassID)
static

Definition at line 230 of file PassTimingInfo.cpp.

◆ matchSelectPattern() [1/2]

SelectPatternResult llvm::matchSelectPattern ( const Value V,
const Value *&  LHS,
const Value *&  RHS,
Instruction::CastOps CastOp = nullptr 
)
inline

Definition at line 609 of file ValueTracking.h.

References matchSelectPattern().

◆ matchSelectPattern() [2/2]

SelectPatternResult llvm::matchSelectPattern ( Value V,
Value *&  LHS,
Value *&  RHS,
Instruction::CastOps CastOp = nullptr,
unsigned  Depth = 0 
)

Pattern match integer [SU]MIN, [SU]MAX and ABS idioms, returning the kind and providing the out parameter results if we successfully match.

For ABS/NABS, LHS will be set to the input to the abs idiom. RHS will be the negation instruction from the idiom.

If CastOp is not nullptr, also match MIN/MAX idioms where the type does not match that of the original select. If this is the case, the cast operation (one of Trunc,SExt,Zext) that must be done to transform the type of LHS and RHS into the type of V is returned in CastOp.

For example: %1 = icmp slt i32 a, i32 4 %2 = sext i32 a to i64 %3 = select i1 %1, i64 %2, i64 4

-> LHS = a, RHS = i32 4, *CastOp = Instruction::SExt

Definition at line 5046 of file ValueTracking.cpp.

References llvm::SelectInst::getCondition(), llvm::SelectInst::getFalseValue(), llvm::SelectInst::getTrueValue(), matchDecomposedSelectPattern(), MaxDepth, SPF_UNKNOWN, and SPNB_NA.

Referenced by foldCttzCtlz(), matchSelectPattern(), llvm::InstCombiner::visitFCmpInst(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitSub(), llvm::InstCombiner::visitTrunc(), and llvm::InstCombiner::visitXor().

◆ maxIntN()

int64_t llvm::maxIntN ( int64_t  N)
inline

Gets the maximum value for a N-bit signed integer.

Definition at line 383 of file MathExtras.h.

References assert(), and N.

Referenced by isIntN().

◆ maxUIntN()

uint64_t llvm::maxUIntN ( uint64_t  N)
inline

Gets the maximum value for a N-bit unsigned integer.

Definition at line 365 of file MathExtras.h.

References assert(), and N.

Referenced by isUIntN().

◆ maybeMarkSanitizerLibraryCallNoBuiltin()

void llvm::maybeMarkSanitizerLibraryCallNoBuiltin ( CallInst CI,
const TargetLibraryInfo TLI 
)

Given a CallInst, check if it calls a string function known to CodeGen, and mark it with NoBuiltin if so.

To be used by sanitizers that intend to intercept string functions and want to avoid converting them to target specific instructions.

Definition at line 2856 of file Local.cpp.

References llvm::CallBase::addAttribute(), F, llvm::AttributeList::FunctionIndex, llvm::CallBase::getCalledFunction(), llvm::TargetLibraryInfo::getLibFunc(), and llvm::TargetLibraryInfo::hasOptimizedCodeGen().

◆ mayBeMemoryDependent()

bool llvm::mayBeMemoryDependent ( const Instruction I)

Returns true if the result or effects of the given instructions I depend on or influence global memory.

Memory dependence arises for example if the instruction reads from memory or may produce effects or undefined behaviour. Memory dependent instructions generally cannot be reorderd with respect to other memory dependent instructions or moved into non-dominated basic blocks. Instructions which just compute a value based on the values of their operands are not memory dependent.

Definition at line 3957 of file ValueTracking.cpp.

References I, and isSafeToSpeculativelyExecute().

Referenced by isSafeToSpeculatePHIUsers().

◆ mayBeOldLoopAttachmentTag()

bool llvm::mayBeOldLoopAttachmentTag ( StringRef  Name)
inline

Check whether a string looks like an old loop attachment tag.

Definition at line 83 of file AutoUpgrade.h.

◆ MD5Hash()

uint64_t llvm::MD5Hash ( StringRef  Str)
inline

Helper to compute and return lower 64 bits of the given string's MD5 hash.

Definition at line 109 of file MD5.h.

References llvm::MD5::final(), llvm::MD5::MD5Result::low(), and llvm::MD5::update().

Referenced by llvm::GlobalValue::getGUID().

◆ MergeBasicBlockIntoOnlyPred()

void llvm::MergeBasicBlockIntoOnlyPred ( BasicBlock DestBB,
DomTreeUpdater DTU = nullptr 
)

BB is a block with one predecessor and its predecessor is known to have one successor (BB!).

MergeBasicBlockIntoOnlyPred - DestBB is a block with one predecessor and its predecessor is known to have one successor (DestBB!).

Eliminate the edge between them, moving the instructions in the predecessor into BB. This deletes the predecessor block.

Eliminate the edge between them, moving the instructions in the predecessor into DestBB and deleting the predecessor block.

Definition at line 679 of file Local.cpp.

References llvm::DomTreeUpdater::applyUpdatesPermissive(), assert(), llvm::BasicBlock::begin(), llvm::DomTreeUpdater::deleteBB(), llvm::Constant::destroyConstant(), llvm::BasicBlock::eraseFromParent(), llvm::Instruction::eraseFromParent(), llvm::BlockAddress::get(), llvm::UndefValue::get(), llvm::ConstantInt::get(), llvm::BasicBlock::getContext(), llvm::Value::getContext(), llvm::Function::getEntryBlock(), llvm::BasicBlock::getInstList(), llvm::IRBuilderBase::getInt32Ty(), llvm::ConstantExpr::getIntToPtr(), llvm::BasicBlock::getParent(), llvm::BasicBlock::getSinglePredecessor(), llvm::BasicBlock::getTerminator(), llvm::Value::getType(), llvm::BasicBlock::hasAddressTaken(), llvm::DomTreeUpdater::hasDomTree(), I, llvm::BasicBlock::moveAfter(), pred_begin(), pred_end(), llvm::DomTreeUpdater::recalculate(), llvm::Value::replaceAllUsesWith(), succ_end(), and successors().

Referenced by llvm::JumpThreadingPass::ProcessBlock().

◆ MergeBlockIntoPredecessor()

bool llvm::MergeBlockIntoPredecessor ( BasicBlock BB,
DomTreeUpdater DTU = nullptr,
LoopInfo LI = nullptr,
MemorySSAUpdater MSSAU = nullptr,
MemoryDependenceResults MemDep = nullptr 
)

◆ MinAlign()

constexpr uint64_t llvm::MinAlign ( uint64_t  A,
uint64_t  B 
)
inlineconstexpr

A and B are either alignments or offsets.

Return the minimum alignment that may be assumed after adding the two together.

Definition at line 614 of file MathExtras.h.

Referenced by findCommonAlignment(), getAdjustedAlignment(), SRAGlobal(), unpackLoadToAggregate(), and unpackStoreToAggregate().

◆ minIntN()

int64_t llvm::minIntN ( int64_t  N)
inline

Gets the minimum value for a N-bit signed integer.

Definition at line 376 of file MathExtras.h.

References assert(), and N.

Referenced by isIntN().

◆ mustTriggerUB()

bool llvm::mustTriggerUB ( const Instruction I,
const SmallSet< const Value *, 16 > &  KnownPoison 
)

Return true if the given instruction must trigger undefined behavior.

when I is executed with any operands which appear in KnownPoison holding a full-poison value at the point of execution.

Definition at line 4377 of file ValueTracking.cpp.

References getGuaranteedNonFullPoisonOp(), and I.

Referenced by mustExecuteUBIfPoisonOnPathTo(), and programUndefinedIfFullPoison().

◆ nameUnamedGlobals()

bool llvm::nameUnamedGlobals ( Module M)

Rename all the anon globals in the module using a hash computed from the list of public globals in the module.

Definition at line 65 of file NameAnonGlobals.cpp.

Referenced by llvm::NameAnonGlobalPass::run().

◆ NextPowerOf2()

uint64_t llvm::NextPowerOf2 ( uint64_t  A)
inline

◆ normalizeForPostIncUse()

const SCEV * llvm::normalizeForPostIncUse ( const SCEV S,
const PostIncLoopSet Loops,
ScalarEvolution SE 
)

Normalize S to be post-increment for all loops present in Loops.

Definition at line 96 of file ScalarEvolutionNormalization.cpp.

References llvm::SCEVAddRecExpr::getLoop(), Loops, and Normalize.

Referenced by llvm::IVUsers::getExpr().

◆ normalizeForPostIncUseIf()

const SCEV * llvm::normalizeForPostIncUseIf ( const SCEV S,
NormalizePredTy  Pred,
ScalarEvolution SE 
)

Normalize S for all add recurrence sub-expressions for which Pred returns true.

Definition at line 105 of file ScalarEvolutionNormalization.cpp.

References Normalize.

Referenced by llvm::IVUsers::AddUsersImpl().

◆ NullPointerIsDefined()

bool llvm::NullPointerIsDefined ( const Function F,
unsigned  AS = 0 
)

Check whether null pointer dereferencing is considered undefined behavior for a given function or an address space.

Null pointer access in non-zero address space is not considered undefined. Return value: false => null pointer dereference is undefined. Return value: true => null pointer dereference is not undefined.

Definition at line 1523 of file Function.cpp.

References F.

Referenced by AllUsesOfValueWillTrapIfNull(), canSimplifyNullLoadOrGEP(), canSimplifyNullStoreOrGEP(), computePointerICmp(), ConstantFoldCompareInstruction(), evaluateICmpRelation(), getPointerSize(), getPtrStride(), llvm::Argument::hasNonNullAttr(), isGEPKnownNonNull(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, IterTy >::isReturnNonNull(), llvm::CallBase::isReturnNonNull(), markAliveBlocks(), OptimizeAwayTrappingUsesOfValue(), optimizeOnceStoredGlobal(), passingValueIsAlwaysUndefined(), and llvm::InstCombiner::visitLoadInst().

◆ nulls()

raw_ostream & llvm::nulls ( )

This returns a reference to a raw_ostream which simply discards output.

nulls() - This returns a reference to a raw_ostream which discards output.

Definition at line 860 of file raw_ostream.cpp.

Referenced by llvm::DWARFFormValue::dump(), and LLVMParseCommandLineOptions().

◆ OffsetToAlignment()

uint64_t llvm::OffsetToAlignment ( uint64_t  Value,
uint64_t  Align 
)
inline

Returns the offset to the next integer (mod 2**64) that is greater than or equal to Value and is a multiple of Align.

Align must be non-zero.

Definition at line 731 of file MathExtras.h.

References alignTo().

Referenced by llvm::OnDiskChainedHashTableGenerator< Info >::Emit().

◆ onlyUsedByLifetimeMarkers()

bool llvm::onlyUsedByLifetimeMarkers ( const Value V)

Return true if the only users of this pointer are lifetime markers.

Definition at line 3857 of file ValueTracking.cpp.

References llvm::Instruction::isLifetimeStartOrEnd(), and llvm::Value::users().

Referenced by isAllocaPromotable().

◆ operator!=() [1/6]

bool llvm::operator!= ( const DWARFDie LHS,
const DWARFDie RHS 
)
inline

Definition at line 327 of file DWARFDie.h.

◆ operator!=() [2/6]

bool llvm::operator!= ( const DWARFDie::attribute_iterator LHS,
const DWARFDie::attribute_iterator RHS 
)
inline

Definition at line 317 of file DWARFDie.h.

◆ operator!=() [3/6]

bool llvm::operator!= ( const DWARFDie::iterator LHS,
const DWARFDie::iterator RHS 
)
inline

Definition at line 367 of file DWARFDie.h.

◆ operator!=() [4/6]

bool llvm::operator!= ( const DWARFExpression::iterator LHS,
const DWARFExpression::iterator RHS 
)
inline

Definition at line 154 of file DWARFExpression.h.

◆ operator!=() [5/6]

bool llvm::operator!= ( const std::reverse_iterator< DWARFDie::iterator > &  LHS,
const std::reverse_iterator< DWARFDie::iterator > &  RHS 
)
inline

Definition at line 453 of file DWARFDie.h.

◆ operator!=() [6/6]

bool llvm::operator!= ( const ValueInfo A,
const ValueInfo B 
)
inline

Definition at line 243 of file ModuleSummaryIndex.h.

References assert(), and llvm::ValueInfo::getRef().

◆ operator&()

ChangeStatus llvm::operator& ( ChangeStatus  l,
ChangeStatus  r 
)

Definition at line 93 of file Attributor.cpp.

◆ operator<() [1/7]

bool llvm::operator< ( AtomicOrdering  ,
AtomicOrdering   
)
delete

◆ operator<() [2/7]

bool llvm::operator< ( AtomicOrderingCABI  ,
AtomicOrderingCABI   
)
delete

◆ operator<() [3/7]

bool llvm::operator< ( const DIExpression::FragmentInfo A,
const DIExpression::FragmentInfo B 
)
inline

◆ operator<() [4/7]

static bool llvm::operator< ( const DWARFAddressRange LHS,
const DWARFAddressRange RHS 
)
inlinestatic

◆ operator<() [5/7]

bool llvm::operator< ( const DWARFDie LHS,
const DWARFDie RHS 
)
inline

Definition at line 331 of file DWARFDie.h.

References llvm::DWARFDie::getOffset().

◆ operator<() [6/7]

static bool llvm::operator< ( const DWARFVerifier::DieRangeInfo LHS,
const DWARFVerifier::DieRangeInfo RHS 
)
inlinestatic

◆ operator<() [7/7]

bool llvm::operator< ( const ValueInfo A,
const ValueInfo B 
)
inline

◆ operator<<() [1/42]

template<class DigitsT >
ScaledNumber< DigitsT > llvm::operator<< ( const ScaledNumber< DigitsT > &  L,
int16_t  Shift 
)

Definition at line 406 of file ScaledNumber.h.

◆ operator<<() [2/42]

llvm::raw_ostream & llvm::operator<< ( llvm::raw_ostream OS,
const GUID &  G 
)

Definition at line 192 of file DIARawSymbol.cpp.

References G.

◆ operator<<() [3/42]

template<class NodeT >
raw_ostream & llvm::operator<< ( raw_ostream O,
const DomTreeNodeBase< NodeT > *  Node 
)

Definition at line 167 of file GenericDomTree.h.

◆ operator<<() [4/42]

raw_ostream & llvm::operator<< ( raw_ostream O,
const Module M 
)
inline

An raw_ostream inserter for modules.

Definition at line 908 of file Module.h.

◆ operator<<() [5/42]

raw_ostream & llvm::operator<< ( raw_ostream OS,
AbstractAttribute::ManifestPosition  AP 
)

◆ operator<<() [6/42]

raw_ostream & llvm::operator<< ( raw_ostream OS,
AliasResult  AR 
)

<< operator for AliasResult.

Definition at line 410 of file AliasAnalysis.cpp.

References MayAlias, MustAlias, NoAlias, and PartialAlias.

◆ operator<<() [7/42]

raw_ostream & llvm::operator<< ( raw_ostream OS,
BranchProbability  Prob 
)
inline

Definition at line 200 of file BranchProbability.h.

References llvm::BranchProbability::print().

◆ operator<<() [8/42]

raw_ostream & llvm::operator<< ( raw_ostream OS,
ChangeStatus  S 
)

Helpers to ease debugging through output streams and print calls.

{

Definition at line 1575 of file Attributor.cpp.

References CHANGED.

◆ operator<<() [9/42]

raw_ostream & llvm::operator<< ( raw_ostream OS,
const AbstractAttribute AA 
)

Forward declarations of output streams for debug purposes.

{

Definition at line 1598 of file Attributor.cpp.

References llvm::AbstractAttribute::print().

◆ operator<<() [10/42]

raw_ostream & llvm::operator<< ( raw_ostream OS,
const AbstractState State 
)

◆ operator<<() [11/42]

raw_ostream & llvm::operator<< ( raw_ostream OS,
const AliasSet AS 
)
inline

Definition at line 322 of file AliasSetTracker.h.

References llvm::AliasSet::print().

◆ operator<<() [12/42]

raw_ostream & llvm::operator<< ( raw_ostream OS,
const AliasSetTracker AST 
)
inline

Definition at line 459 of file AliasSetTracker.h.

References llvm::AliasSetTracker::print().

◆ operator<<() [13/42]

raw_ostream & llvm::operator<< ( raw_ostream OS,
const Comdat C 
)
inline

Definition at line 63 of file Comdat.h.

◆ operator<<() [14/42]

raw_ostream & llvm::operator<< ( raw_ostream OS,
const ConstantRange CR 
)
inline

Definition at line 459 of file ConstantRange.h.

References llvm::ConstantRange::print().

◆ operator<<() [15/42]

raw_ostream & llvm::operator<< ( raw_ostream OS,
const DWARFAddressRange R 
)

Definition at line 25 of file DWARFAddressRange.cpp.

◆ operator<<() [16/42]

raw_ostream & llvm::operator<< ( raw_ostream OS,
const HexNumber Value 
)

Definition at line 10 of file ScopedPrinter.cpp.

References to_hexString(), and llvm::Value::Value().

◆ operator<<() [17/42]

raw_ostream & llvm::operator<< ( raw_ostream OS,
const LLT Ty 
)
inline

Definition at line 275 of file LowLevelTypeImpl.h.

References llvm::LLT::print().

◆ operator<<() [18/42]

template<class BlockT , class LoopT >
raw_ostream & llvm::operator<< ( raw_ostream OS,
const LoopBase< BlockT, LoopT > &  Loop 
)

Definition at line 496 of file LoopInfo.h.

References llvm::LoopBase< BlockT, LoopT >::print().

◆ operator<<() [19/42]

raw_ostream & llvm::operator<< ( raw_ostream OS,
const MemoryAccess MA 
)
inline

Definition at line 235 of file MemorySSA.h.

References llvm::MemoryAccess::print().

◆ operator<<() [20/42]

raw_ostream & llvm::operator<< ( raw_ostream OS,
const Metadata MD 
)
inline

Definition at line 161 of file Metadata.h.

References llvm::Metadata::print().

◆ operator<<() [21/42]

raw_ostream & llvm::operator<< ( raw_ostream OS,
const Printable P 
)
inline

Definition at line 44 of file Printable.h.

References P.

◆ operator<<() [22/42]

template<class Tr >
raw_ostream & llvm::operator<< ( raw_ostream OS,
const RegionNodeBase< Tr > &  Node 
)
inline

Print a RegionNode.

Definition at line 1015 of file RegionInfo.h.

◆ operator<<() [23/42]

template<class DigitsT >
raw_ostream & llvm::operator<< ( raw_ostream OS,
const ScaledNumber< DigitsT > &  X 
)

Definition at line 742 of file ScaledNumber.h.

References X().

◆ operator<<() [24/42]

raw_ostream & llvm::operator<< ( raw_ostream OS,
const SCEV S 
)
inline

Definition at line 180 of file ScalarEvolution.h.

References llvm::SCEV::print().

◆ operator<<() [25/42]

raw_ostream & llvm::operator<< ( raw_ostream OS,
const SCEVPredicate P 
)
inline

Definition at line 239 of file ScalarEvolution.h.

References P.

◆ operator<<() [26/42]

raw_ostream & llvm::operator<< ( raw_ostream OS,
const Type T 
)
inline

Definition at line 458 of file Type.h.

References llvm::Type::print().

◆ operator<<() [27/42]

raw_ostream & llvm::operator<< ( raw_ostream OS,
const Value V 
)
inline

Definition at line 705 of file Value.h.

References llvm::Value::print().

◆ operator<<() [28/42]

raw_ostream & llvm::operator<< ( raw_ostream OS,
const ValueInfo VI 
)
inline

Definition at line 230 of file ModuleSummaryIndex.h.

References llvm::ValueInfo::getGUID(), and llvm::ValueInfo::name().

◆ operator<<() [29/42]

raw_ostream & llvm::operator<< ( raw_ostream OS,
const ValueLatticeElement Val 
)

◆ operator<<() [30/42]

raw_ostream & llvm::operator<< ( raw_ostream OS,
const VPlanIngredient I 
)
inline

Definition at line 1314 of file VPlan.h.

References I.

◆ operator<<() [31/42]

raw_ostream & llvm::operator<< ( raw_ostream OS,
const VPValue V 
)

Definition at line 50 of file VPlan.cpp.

References llvm::VPValue::printAsOperand().

◆ operator<<() [32/42]

raw_ostream & llvm::operator<< ( raw_ostream OS,
LocationSize  Size 
)
inline

Definition at line 160 of file MemoryLocation.h.

◆ operator<<() [33/42]

raw_ostream & llvm::operator<< ( raw_ostream OS,
sys::TimePoint<>  TP 
)

Definition at line 43 of file Chrono.cpp.

References format(), and getStructTM().

◆ operator<<() [34/42]

raw_ostream & llvm::operator<< ( raw_ostream OS,
VPlan Plan 
)
inline

Definition at line 1319 of file VPlan.h.

◆ operator<<() [35/42]

raw_ostream & llvm::operator<< ( raw_ostream Out,
const VersionTuple V 
)

◆ operator<<() [36/42]

template<class RemarkT >
RemarkT & llvm::operator<< ( RemarkT &&  R,
typename std::enable_if< std::is_base_of< DiagnosticInfoOptimizationBase, RemarkT >::value, DiagnosticInfoOptimizationBase::Argument >::type  A 
)

Definition at line 562 of file DiagnosticInfo.h.

◆ operator<<() [37/42]

template<class RemarkT >
RemarkT & llvm::operator<< ( RemarkT &&  R,
typename std::enable_if< std::is_base_of< DiagnosticInfoOptimizationBase, RemarkT >::value, DiagnosticInfoOptimizationBase::setIsVerbose >::type  V 
)

Definition at line 582 of file DiagnosticInfo.h.

◆ operator<<() [38/42]

template<class RemarkT >
RemarkT & llvm::operator<< ( RemarkT &&  R,
typename std::enable_if< std::is_base_of< DiagnosticInfoOptimizationBase, RemarkT >::value, StringRef >::type  S 
)

Also allow r-value for the remark to allow insertion into a temporarily-constructed remark.

Definition at line 542 of file DiagnosticInfo.h.

◆ operator<<() [39/42]

template<class RemarkT >
RemarkT & llvm::operator<< ( RemarkT &  R,
typename std::enable_if< std::is_base_of< DiagnosticInfoOptimizationBase, RemarkT >::value, DiagnosticInfoOptimizationBase::Argument >::type  A 
)

Definition at line 552 of file DiagnosticInfo.h.

◆ operator<<() [40/42]

template<class RemarkT >
RemarkT & llvm::operator<< ( RemarkT &  R,
typename std::enable_if< std::is_base_of< DiagnosticInfoOptimizationBase, RemarkT >::value, DiagnosticInfoOptimizationBase::setExtraArgs >::type  EA 
)

Definition at line 592 of file DiagnosticInfo.h.

◆ operator<<() [41/42]

template<class RemarkT >
RemarkT & llvm::operator<< ( RemarkT &  R,
typename std::enable_if< std::is_base_of< DiagnosticInfoOptimizationBase, RemarkT >::value, DiagnosticInfoOptimizationBase::setIsVerbose >::type  V 
)

Definition at line 572 of file DiagnosticInfo.h.

◆ operator<<() [42/42]

template<class RemarkT >
RemarkT & llvm::operator<< ( RemarkT &  R,
typename std::enable_if< std::is_base_of< DiagnosticInfoOptimizationBase, RemarkT >::value, StringRef >::type  S 
)

Allow the insertion operator to return the actual remark type rather than a common base class.

This allows returning the result of the insertion directly by value, e.g. return OptimizationRemarkAnalysis(...) << "blah".

Definition at line 530 of file DiagnosticInfo.h.

◆ operator<=() [1/2]

bool llvm::operator<= ( AtomicOrdering  ,
AtomicOrdering   
)
delete

◆ operator<=() [2/2]

bool llvm::operator<= ( AtomicOrderingCABI  ,
AtomicOrderingCABI   
)
delete

◆ operator==() [1/9]

bool llvm::operator== ( const DIExpression::FragmentInfo A,
const DIExpression::FragmentInfo B 
)
inline

◆ operator==() [2/9]

bool llvm::operator== ( const DWARFDie LHS,
const DWARFDie RHS 
)
inline

◆ operator==() [3/9]

bool llvm::operator== ( const DWARFDie::attribute_iterator LHS,
const DWARFDie::attribute_iterator RHS 
)
inline

Definition at line 312 of file DWARFDie.h.

Referenced by llvm::IRMover::StructTypeKeyInfo::KeyTy::operator!=().

◆ operator==() [4/9]

bool llvm::operator== ( const DWARFDie::iterator LHS,
const DWARFDie::iterator RHS 
)
inline

Definition at line 362 of file DWARFDie.h.

◆ operator==() [5/9]

bool llvm::operator== ( const DWARFExpression::iterator LHS,
const DWARFExpression::iterator RHS 
)
inline

Definition at line 149 of file DWARFExpression.h.

◆ operator==() [6/9]

template<class T , class E >
std::enable_if< std::is_error_code_enum< E >::value||std::is_error_condition_enum< E >::value, bool >::type llvm::operator== ( const ErrorOr< T > &  Err,
Code 
)

Definition at line 272 of file ErrorOr.h.

◆ operator==() [7/9]

bool llvm::operator== ( const MD5::MD5Result LHS,
const MD5::MD5Result RHS 
)
inline

Definition at line 104 of file MD5.h.

References llvm::MD5::MD5Result::Bytes.

◆ operator==() [8/9]

bool llvm::operator== ( const std::reverse_iterator< DWARFDie::iterator > &  LHS,
const std::reverse_iterator< DWARFDie::iterator > &  RHS 
)
inline

Definition at line 448 of file DWARFDie.h.

◆ operator==() [9/9]

bool llvm::operator== ( const ValueInfo A,
const ValueInfo B 
)
inline

Definition at line 237 of file ModuleSummaryIndex.h.

References assert(), and llvm::ValueInfo::getRef().

◆ operator>() [1/2]

bool llvm::operator> ( AtomicOrdering  ,
AtomicOrdering   
)
delete

◆ operator>() [2/2]

bool llvm::operator> ( AtomicOrderingCABI  ,
AtomicOrderingCABI   
)
delete

◆ operator>=() [1/2]

bool llvm::operator>= ( AtomicOrdering  ,
AtomicOrdering   
)
delete

◆ operator>=() [2/2]

bool llvm::operator>= ( AtomicOrderingCABI  ,
AtomicOrderingCABI   
)
delete

◆ operator>>()

template<class DigitsT >
ScaledNumber< DigitsT > llvm::operator>> ( const ScaledNumber< DigitsT > &  L,
int16_t  Shift 
)

Definition at line 736 of file ScaledNumber.h.

◆ operator|() [1/2]

ChangeStatus llvm::operator| ( ChangeStatus  l,
ChangeStatus  r 
)

Logic operators for the change status enum class.

{

Definition at line 90 of file Attributor.cpp.

◆ operator|() [2/2]

RemapFlags llvm::operator| ( RemapFlags  LHS,
RemapFlags  RHS 
)
inline

Definition at line 101 of file ValueMapper.h.

◆ optimized_def_chain()

template<class T >
iterator_range< def_chain_iterator< T, true > > llvm::optimized_def_chain ( MA)
inline

Definition at line 1306 of file MemorySSA.h.

◆ optimizeGlobalCtorsList()

bool llvm::optimizeGlobalCtorsList ( Module M,
function_ref< bool(Function *)>  ShouldRemove 
)

Call "ShouldRemove" for every entry in M's global_ctor list and remove the entries for which it returns true.

Return true if anything changed.

Definition at line 116 of file CtorUtils.cpp.

References dbgs(), F, findGlobalCtors(), LLVM_DEBUG, parseGlobalCtors(), and removeGlobalCtors().

Referenced by optimizeGlobalsInModule(), and llvm::GlobalDCEPass::run().

◆ outs()

raw_ostream & llvm::outs ( )

◆ parseAnalysisUtilityPasses()

template<typename AnalysisT , typename IRUnitT , typename AnalysisManagerT , typename... ExtraArgTs>
bool llvm::parseAnalysisUtilityPasses ( StringRef  AnalysisName,
StringRef  PipelineName,
PassManager< IRUnitT, AnalysisManagerT, ExtraArgTs... > &  PM 
)

This utility template takes care of adding require<> and invalidate<> passes for an analysis to a given PassManager.

It is intended to be used during parsing of a pass pipeline when parsing a single PipelineName. When registering a new function analysis FancyAnalysis with the pass pipeline name "fancy-analysis", a matching ParsePipelineCallback could look like this:

static bool parseFunctionPipeline(StringRef Name, FunctionPassManager &FPM, ArrayRef<PipelineElement> P) { if (parseAnalysisUtilityPasses<FancyAnalysis>("fancy-analysis", Name, FPM)) return true; return false; }

Definition at line 736 of file PassBuilder.h.

References llvm::PassManager< IRUnitT, AnalysisManagerT, ExtraArgTs >::addPass().

◆ parseAssembly()

std::unique_ptr< Module > llvm::parseAssembly ( MemoryBufferRef  F,
SMDiagnostic Err,
LLVMContext Context,
SlotMapping Slots = nullptr,
bool  UpgradeDebugInfo = true,
StringRef  DataLayoutString = "" 
)

parseAssemblyFile and parseAssemblyString are wrappers around this function.

Parse LLVM Assembly from a MemoryBuffer.

Parameters
FThe MemoryBuffer containing assembly
ErrError result info.
SlotsThe optional slot mapping that will be initialized during parsing.
UpgradeDebugInfoRun UpgradeDebugInfo, which runs the Verifier. This option should only be set to false by llvm-as for use inside the LLVM testuite!
DataLayoutStringOverride datalayout in the llvm assembly.

Definition at line 41 of file Parser.cpp.

References F, parseAssemblyInto(), and UpgradeDebugInfo().

Referenced by getLazyIRModule(), parseAssemblyFile(), parseAssemblyString(), and parseIR().

◆ parseAssemblyFile()

std::unique_ptr< Module > llvm::parseAssemblyFile ( StringRef  Filename,
SMDiagnostic Err,
LLVMContext Context,
SlotMapping Slots = nullptr,
bool  UpgradeDebugInfo = true,
StringRef  DataLayoutString = "" 
)

This function is a main interface to the LLVM Assembly Parser.

It parses an ASCII file that (presumably) contains LLVM Assembly code. It returns a Module (intermediate representation) with the corresponding features. Note that this does not verify that the generated Module is valid, so you should run the verifier after parsing the file to check that it is okay. Parse LLVM Assembly from a file

Parameters
FilenameThe name of the file to parse
ErrError result info.
ContextContext in which to allocate globals info.
SlotsThe optional slot mapping that will be initialized during parsing.
UpgradeDebugInfoRun UpgradeDebugInfo, which runs the Verifier. This option should only be set to false by llvm-as for use inside the LLVM testuite!
DataLayoutStringOverride datalayout in the llvm assembly.

Definition at line 55 of file Parser.cpp.

References llvm::SourceMgr::DK_Error, llvm::ErrorOr< T >::get(), llvm::ErrorOr< T >::getError(), llvm::MemoryBuffer::getFileOrSTDIN(), parseAssembly(), and UpgradeDebugInfo().

◆ parseAssemblyFileWithIndex()

ParsedModuleAndIndex llvm::parseAssemblyFileWithIndex ( StringRef  Filename,
SMDiagnostic Err,
LLVMContext Context,
SlotMapping Slots = nullptr,
bool  UpgradeDebugInfo = true,
StringRef  DataLayoutString = "" 
)

This function is a main interface to the LLVM Assembly Parser.

It parses an ASCII file that (presumably) contains LLVM Assembly code, including a module summary. It returns a Module (intermediate representation) and a ModuleSummaryIndex with the corresponding features. Note that this does not verify that the generated Module or Index are valid, so you should run the verifier after parsing the file to check that they are okay. Parse LLVM Assembly from a file

Parameters
FilenameThe name of the file to parse
ErrError result info.
ContextContext in which to allocate globals info.
SlotsThe optional slot mapping that will be initialized during parsing.
UpgradeDebugInfoRun UpgradeDebugInfo, which runs the Verifier. This option should only be set to false by llvm-as for use inside the LLVM testuite!
DataLayoutStringOverride datalayout in the llvm assembly.

Definition at line 85 of file Parser.cpp.

References llvm::SourceMgr::DK_Error, llvm::ErrorOr< T >::get(), llvm::ErrorOr< T >::getError(), llvm::MemoryBuffer::getFileOrSTDIN(), parseAssemblyWithIndex(), and UpgradeDebugInfo().

◆ parseAssemblyInto()

bool llvm::parseAssemblyInto ( MemoryBufferRef  F,
Module M,
ModuleSummaryIndex Index,
SMDiagnostic Err,
SlotMapping Slots = nullptr,
bool  UpgradeDebugInfo = true,
StringRef  DataLayoutString = "" 
)

This function is the low-level interface to the LLVM Assembly Parser.

This is kept as an independent function instead of being inlined into parseAssembly for the convenience of interactive users that want to add recently parsed bits to an existing module.

Parameters
FThe MemoryBuffer containing assembly
MThe module to add data to.
IndexThe index to add data to.
ErrError result info.
SlotsThe optional slot mapping that will be initialized during parsing.
Returns
true on error.
Parameters
UpgradeDebugInfoRun UpgradeDebugInfo, which runs the Verifier. This option should only be set to false by llvm-as for use inside the LLVM testuite!
DataLayoutStringOverride datalayout in the llvm assembly.

Definition at line 25 of file Parser.cpp.

References llvm::SourceMgr::AddNewSourceBuffer(), F, llvm::MemoryBuffer::getMemBuffer(), llvm::LLParser::Run(), and UpgradeDebugInfo().

Referenced by parseAssembly(), and parseAssemblyWithIndex().

◆ parseAssemblyString()

std::unique_ptr< Module > llvm::parseAssemblyString ( StringRef  AsmString,
SMDiagnostic Err,
LLVMContext Context,
SlotMapping Slots = nullptr,
bool  UpgradeDebugInfo = true,
StringRef  DataLayoutString = "" 
)

The function is a secondary interface to the LLVM Assembly Parser.

It parses an ASCII string that (presumably) contains LLVM Assembly code. It returns a Module (intermediate representation) with the corresponding features. Note that this does not verify that the generated Module is valid, so you should run the verifier after parsing the file to check that it is okay. Parse LLVM Assembly from a string

Parameters
AsmStringThe string containing assembly
ErrError result info.
ContextContext in which to allocate globals info.
SlotsThe optional slot mapping that will be initialized during parsing.
UpgradeDebugInfoRun UpgradeDebugInfo, which runs the Verifier. This option should only be set to false by llvm-as for use inside the LLVM testuite!
DataLayoutStringOverride datalayout in the llvm assembly.

Definition at line 102 of file Parser.cpp.

References F, parseAssembly(), and UpgradeDebugInfo().

◆ parseAssemblyWithIndex()

ParsedModuleAndIndex llvm::parseAssemblyWithIndex ( MemoryBufferRef  F,
SMDiagnostic Err,
LLVMContext Context,
SlotMapping Slots = nullptr,
bool  UpgradeDebugInfo = true,
StringRef  DataLayoutString = "" 
)

Parse LLVM Assembly including the summary index from a MemoryBuffer.

Parameters
FThe MemoryBuffer containing assembly with summary
ErrError result info.
SlotsThe optional slot mapping that will be initialized during parsing.
UpgradeDebugInfoRun UpgradeDebugInfo, which runs the Verifier. This option should only be set to false by llvm-as for use inside the LLVM testuite!
DataLayoutStringOverride datalayout in the llvm assembly.

parseAssemblyFileWithIndex is a wrapper around this function.

Definition at line 70 of file Parser.cpp.

References F, parseAssemblyInto(), and UpgradeDebugInfo().

Referenced by parseAssemblyFileWithIndex().

◆ parseCachePruningPolicy()

Expected< CachePruningPolicy > llvm::parseCachePruningPolicy ( StringRef  PolicyStr)

Parse the given string as a cache pruning policy.

Defaults are taken from a default constructed CachePruningPolicy object. For example: "prune_interval=30s:prune_after=24h:cache_size=50%" which means a pruning interval of 30 seconds, expiration time of 24 hours and maximum cache size of 50% of available disk space.

Definition at line 77 of file CachePruning.cpp.

References llvm::CachePruningPolicy::Expiration, inconvertibleErrorCode(), llvm::CachePruningPolicy::Interval, llvm::CachePruningPolicy::MaxSizeBytes, llvm::CachePruningPolicy::MaxSizeFiles, llvm::CachePruningPolicy::MaxSizePercentageOfAvailableSpace, P, and parseDuration().

◆ parseConstantValue()

Constant * llvm::parseConstantValue ( StringRef  Asm,
SMDiagnostic Err,
const Module M,
const SlotMapping Slots = nullptr 
)

Parse a type and a constant value in the given string.

The constant value can be any LLVM constant, including a constant expression.

Parameters
SlotsThe optional slot mapping that will restore the parsing state of the module.
Returns
null on error.

Definition at line 147 of file Parser.cpp.

References llvm::SourceMgr::AddNewSourceBuffer(), llvm::MemoryBuffer::getMemBuffer(), and llvm::LLParser::parseStandaloneConstantValue().

◆ parseIR()

std::unique_ptr< Module > llvm::parseIR ( MemoryBufferRef  Buffer,
SMDiagnostic Err,
LLVMContext Context,
bool  UpgradeDebugInfo = true,
StringRef  DataLayoutString = "" 
)

If the given MemoryBuffer holds a bitcode image, return a Module for it.

Otherwise, attempt to parse it as LLVM Assembly and return a Module for it.

Parameters
UpgradeDebugInfoRun UpgradeDebugInfo, which runs the Verifier. This option should only be set to false by llvm-as for use inside the LLVM testuite!
DataLayoutStringOverride datalayout in the llvm assembly.

Definition at line 68 of file IRReader.cpp.

References llvm::SourceMgr::DK_Error, llvm::Expected< T >::get(), llvm::MemoryBufferRef::getBufferEnd(), llvm::MemoryBufferRef::getBufferIdentifier(), llvm::MemoryBufferRef::getBufferStart(), handleAllErrors(), llvm::ErrorInfoBase::message(), parseAssembly(), llvm::Expected< T >::takeError(), TimeIRParsingDescription, TimeIRParsingGroupDescription, TimeIRParsingGroupName, TimeIRParsingName, TimePassesIsEnabled, and UpgradeDebugInfo().

Referenced by LLVMParseIRInContext(), and parseIRFile().

◆ parseIRFile()

std::unique_ptr< Module > llvm::parseIRFile ( StringRef  Filename,
SMDiagnostic Err,
LLVMContext Context,
bool  UpgradeDebugInfo = true,
StringRef  DataLayoutString = "" 
)

If the given file holds a bitcode image, return a Module for it.

Otherwise, attempt to parse it as LLVM Assembly and return a Module for it.

Parameters
UpgradeDebugInfoRun UpgradeDebugInfo, which runs the Verifier. This option should only be set to false by llvm-as for use inside the LLVM testuite!
DataLayoutStringOverride datalayout in the llvm assembly.

Definition at line 95 of file IRReader.cpp.

References llvm::SourceMgr::DK_Error, llvm::ErrorOr< T >::get(), llvm::ErrorOr< T >::getError(), llvm::MemoryBuffer::getFileOrSTDIN(), parseIR(), and UpgradeDebugInfo().

◆ parseStatepointDirectivesFromAttrs()

StatepointDirectives llvm::parseStatepointDirectivesFromAttrs ( AttributeList  AS)

◆ parseSummaryIndexAssembly()

std::unique_ptr< ModuleSummaryIndex > llvm::parseSummaryIndexAssembly ( MemoryBufferRef  F,
SMDiagnostic Err 
)

Parse LLVM Assembly for summary index from a MemoryBuffer.

Parameters
FThe MemoryBuffer containing assembly with summary
ErrError result info.

parseSummaryIndexAssemblyFile is a wrapper around this function.

Definition at line 124 of file Parser.cpp.

References F, and parseSummaryIndexAssemblyInto().

Referenced by parseSummaryIndexAssemblyFile().

◆ parseSummaryIndexAssemblyFile()

std::unique_ptr< ModuleSummaryIndex > llvm::parseSummaryIndexAssemblyFile ( StringRef  Filename,
SMDiagnostic Err 
)

This function is a main interface to the LLVM Assembly Parser.

It parses an ASCII file that (presumably) contains LLVM Assembly code for a module summary. It returns a a ModuleSummaryIndex with the corresponding features. Note that this does not verify that the generated Index is valid, so you should run the verifier after parsing the file to check that it is okay. Parse LLVM Assembly Index from a file

Parameters
FilenameThe name of the file to parse
ErrError result info.

Definition at line 135 of file Parser.cpp.

References llvm::SourceMgr::DK_Error, llvm::ErrorOr< T >::get(), llvm::ErrorOr< T >::getError(), llvm::MemoryBuffer::getFileOrSTDIN(), and parseSummaryIndexAssembly().

◆ parseType()

Type * llvm::parseType ( StringRef  Asm,
SMDiagnostic Err,
const Module M,
const SlotMapping Slots = nullptr 
)

Parse a type in the given string.

Parameters
SlotsThe optional slot mapping that will restore the parsing state of the module.
Returns
null on error.

Definition at line 159 of file Parser.cpp.

References llvm::SourceMgr::AddNewSourceBuffer(), llvm::SourceMgr::DK_Error, llvm::SMLoc::getFromPointer(), llvm::MemoryBuffer::getMemBuffer(), llvm::SourceMgr::GetMessage(), and parseTypeAtBeginning().

◆ parseTypeAtBeginning()

Type * llvm::parseTypeAtBeginning ( StringRef  Asm,
unsigned Read,
SMDiagnostic Err,
const Module M,
const SlotMapping Slots = nullptr 
)

Parse a string Asm that starts with a type.

Read[out] gives the number of characters that have been read to parse the type in Asm.

Parameters
SlotsThe optional slot mapping that will restore the parsing state of the module.
Returns
null on error.

Definition at line 175 of file Parser.cpp.

References llvm::SourceMgr::AddNewSourceBuffer(), llvm::MemoryBuffer::getMemBuffer(), and llvm::LLParser::parseTypeAtBeginning().

Referenced by parseType().

◆ parseWidenableBranch()

bool llvm::parseWidenableBranch ( const User U,
Value *&  Condition,
Value *&  WidenableCondition,
BasicBlock *&  IfTrueBB,
BasicBlock *&  IfFalseBB 
)

If U is widenable branch looking like: cond = ... wc = call i1 @llvm.experimental.widenable.condition() branch_cond = and i1 cond, wc br i1 branch_cond, label if_true_bb, label if_false_bb ; <— U The function returns true, and the values cond and wc and blocks if_true_bb, if_false_bb are returned in the parameters (Condition, WidenableCondition, IfTrueBB and IfFalseFF) respectively.

If U does not match this pattern, return false.

Definition at line 38 of file GuardUtils.cpp.

Referenced by isGuardAsWidenableBranch().

◆ partAsHex()

static unsigned int llvm::partAsHex ( char dst,
APFloatBase::integerPart  part,
unsigned int  count,
const char hexDigitChars 
)
static

Definition at line 643 of file APFloat.cpp.

References assert().

◆ partCountForBits()

static unsigned int llvm::partCountForBits ( unsigned int  bits)
inlinestatic

Definition at line 212 of file APFloat.cpp.

References bits.

◆ patchReplacementInstruction()

void llvm::patchReplacementInstruction ( Instruction I,
Value Repl 
)

Patch the replacement so that it is not more restrictive than the value being replaced.

It assumes that the replacement does not get moved from its original position.

Definition at line 2392 of file Local.cpp.

References combineMetadata(), I, llvm::LLVMContext::MD_access_group, llvm::LLVMContext::MD_alias_scope, llvm::LLVMContext::MD_fpmath, llvm::LLVMContext::MD_invariant_group, llvm::LLVMContext::MD_invariant_load, llvm::LLVMContext::MD_noalias, llvm::LLVMContext::MD_nonnull, llvm::LLVMContext::MD_range, and llvm::LLVMContext::MD_tbaa.

Referenced by patchAndReplaceAllUsesWith().

◆ peekThroughBitcast()

static Value * llvm::peekThroughBitcast ( Value V,
bool  OneUseOnly = false 
)
inlinestatic

Return the source operand of a potentially bitcasted value while optionally checking if it has one use.

If there is no bitcast or the one use check is not met, return the input value itself.

Definition at line 119 of file InstCombineInternal.h.

Referenced by combineLoadToOperationType(), isMinMaxWithLoads(), and llvm::InstCombiner::visitCallInst().

◆ peelLoop()

bool llvm::peelLoop ( Loop L,
unsigned  PeelCount,
LoopInfo LI,
ScalarEvolution SE,
DominatorTree DT,
AssumptionCache AC,
bool  PreserveLCSSA 
)

Peel off the first PeelCount iterations of loop L.

Note that this does not peel them off as a single straight-line block. Rather, each iteration is peeled off separately, and needs to check the exit condition. For loops that dynamically execute PeelCount iterations or less this provides a benefit, since the peeled off iterations, which account for the bulk of dynamic execution, can be further simplified by scalar optimizations.

Definition at line 572 of file LoopUnrollPeel.cpp.

References assert(), llvm::BasicBlock::begin(), canPeel(), llvm::DominatorTreeBase< NodeT, IsPostDom >::changeImmediateDominator(), cloneLoopBlocks(), llvm::LoopBase< BlockT, LoopT >::contains(), F, fixupBranchWeights(), llvm::ScalarEvolution::forgetTopmostLoop(), llvm::DomTreeNodeBase< NodeT >::getBlock(), llvm::LoopBase< BlockT, LoopT >::getExitEdges(), llvm::LoopBase< BlockT, LoopT >::getHeader(), llvm::DomTreeNodeBase< NodeT >::getIDom(), llvm::PHINode::getIncomingValueForBlock(), llvm::LoopBase< BlockT, LoopT >::getLoopLatch(), llvm::LoopBase< BlockT, LoopT >::getLoopPreheader(), llvm::Value::getName(), llvm::DominatorTreeBase< NodeT, IsPostDom >::getNode(), llvm::BasicBlock::getParent(), llvm::LoopBase< BlockT, LoopT >::getParentLoop(), llvm::BasicBlock::getTerminator(), llvm::LoopBase< BlockT, LoopT >::hasDedicatedExits(), I, initBranchWeights(), llvm::LLVMContext::MD_loop, llvm::LoopBlocksDFS::perform(), remapInstructionsInBlocks(), llvm::PHINode::setIncomingValueForBlock(), llvm::Value::setName(), simplifyLoop(), SplitBlock(), SplitEdge(), updateBranchWeights(), and llvm::DominatorTreeBase< NodeT, IsPostDom >::verify().

Referenced by UnrollLoop().

◆ PointerMayBeCaptured() [1/2]

bool llvm::PointerMayBeCaptured ( const Value V,
bool  ReturnCaptures,
bool  StoreCaptures,
unsigned  MaxUsesToExplore = DefaultMaxUsesToExplore 
)

PointerMayBeCaptured - Return true if this pointer value may be captured by the enclosing function (which is required to exist).

This routine can be expensive, so consider caching the results. The boolean ReturnCaptures specifies whether returning the value (or part of it) from the function counts as capturing it or not. The boolean StoreCaptures specified whether storing the value (or part of it) into memory anywhere automatically counts as capturing it or not. MaxUsesToExplore specifies how many uses should the analysis explore for one value before giving up due too "too many uses".

This routine can be expensive, so consider caching the results. The boolean ReturnCaptures specifies whether returning the value (or part of it) from the function counts as capturing it or not. The boolean StoreCaptures specified whether storing the value (or part of it) into memory anywhere automatically counts as capturing it or not.

Definition at line 158 of file CaptureTracking.cpp.

References assert(), and PointerMayBeCaptured().

Referenced by addArgumentAttrs(), computePointerICmp(), eliminateDeadStores(), handleEndBlock(), isFunctionMallocLike(), isLocallyOpenedFile(), isNonEscapingLocalObject(), PointerMayBeCaptured(), PointerMayBeCapturedBefore(), and promoteLoopAccessesToScalars().

◆ PointerMayBeCaptured() [2/2]

void llvm::PointerMayBeCaptured ( const Value V,
CaptureTracker Tracker,
unsigned  MaxUsesToExplore = DefaultMaxUsesToExplore 
)

PointerMayBeCaptured - Visit the value and the values derived from it and find values which appear to be capturing the pointer value.

This feeds results into and is controlled by the CaptureTracker object. MaxUsesToExplore specifies how many uses should the analysis explore for one value before giving up due too "too many uses".

Definition at line 211 of file CaptureTracking.cpp.

References assert(), llvm::LazyCallGraph::Edge::Call, llvm::CaptureTracker::captured(), llvm::Value::getType(), I, Idx, isIntrinsicReturningPointerAliasingArgumentWithoutCapturing(), isNoAliasCall(), llvm::Type::isPointerTy(), isVolatile(), llvm::CaptureTracker::shouldExplore(), llvm::Value::stripPointerCasts(), llvm::CaptureTracker::tooManyUses(), and llvm::Value::uses().

◆ PointerMayBeCapturedBefore()

bool llvm::PointerMayBeCapturedBefore ( const Value V,
bool  ReturnCaptures,
bool  StoreCaptures,
const Instruction I,
const DominatorTree DT,
bool  IncludeI = false,
OrderedBasicBlock OBB = nullptr,
unsigned  MaxUsesToExplore = DefaultMaxUsesToExplore 
)

PointerMayBeCapturedBefore - Return true if this pointer value may be captured by the enclosing function (which is required to exist).

If a DominatorTree is provided, only captures which happen before the given instruction are considered. This routine can be expensive, so consider caching the results. The boolean ReturnCaptures specifies whether returning the value (or part of it) from the function counts as capturing it or not. The boolean StoreCaptures specified whether storing the value (or part of it) into memory anywhere automatically counts as capturing it or not. Captures by the provided instruction are considered if the final parameter is true. An ordered basic block in OBB could be used to speed up capture-tracker queries. MaxUsesToExplore specifies how many uses should the analysis explore for one value before giving up due too "too many uses".

If a DominatorTree is provided, only captures which happen before the given instruction are considered. This routine can be expensive, so consider caching the results. The boolean ReturnCaptures specifies whether returning the value (or part of it) from the function counts as capturing it or not. The boolean StoreCaptures specified whether storing the value (or part of it) into memory anywhere automatically counts as capturing it or not. A ordered basic block OBB can be used in order to speed up queries about relative order among instructions in the same basic block.

Definition at line 185 of file CaptureTracking.cpp.

References assert(), I, and PointerMayBeCaptured().

Referenced by AddAliasScopeMetadata(), and llvm::AAResults::callCapturesBefore().

◆ possiblyDemandedEltsInMask()

APInt llvm::possiblyDemandedEltsInMask ( Value Mask)

Given a mask vector of the form <Y x i1>, return an APInt (of bitwidth Y) for each lane which may be active.

TODO: This is a lot like known bits, but for vectors.

Is there something we can common this with?

Definition at line 785 of file VectorUtils.cpp.

References llvm::Constant::getAllOnesValue(), and llvm::Value::getType().

◆ PowerOf2Ceil()

uint64_t llvm::PowerOf2Ceil ( uint64_t  A)
inline

Returns the power of two which is greater than or equal to the given value.

Essentially, it is a ceil operation across the domain of powers of two.

Definition at line 663 of file MathExtras.h.

References NextPowerOf2().

Referenced by computeKnownBitsFromShiftOperator(), and processUDivOrURem().

◆ PowerOf2Floor()

uint64_t llvm::PowerOf2Floor ( uint64_t  A)
inline

Returns the power of two which is less than or equal to the given value.

Essentially, it is a floor operation across the domain of powers of two.

Definition at line 656 of file MathExtras.h.

References countLeadingZeros(), and ZB_Undefined.

Referenced by llvm::LoopVectorizationCostModel::selectInterleaveCount().

◆ powerOf5()

static unsigned int llvm::powerOf5 ( APFloatBase::integerPart *  dst,
unsigned int  power 
)
static

Definition at line 572 of file APFloat.cpp.

References assert(), maxExponent, and maxPowerOfFiveParts.

◆ pred_begin() [1/3]

pred_iterator llvm::pred_begin ( BasicBlock BB)
inline

Definition at line 108 of file CFG.h.

◆ pred_begin() [2/3]

const_pred_iterator llvm::pred_begin ( const BasicBlock BB)
inline

Definition at line 109 of file CFG.h.

◆ pred_begin() [3/3]

Interval::pred_iterator llvm::pred_begin ( Interval I)
inline

pred_begin/pred_end - define methods so that Intervals may be used just like BasicBlocks can with the pred_* functions, and *pred_iterator.

Definition at line 112 of file Interval.h.

References I.

Referenced by addBlockAndPredsToSet(), CanPropagatePredecessorsForPHIs(), canSplitPredecessors(), llvm::GraphTraits< Inverse< Interval * > >::child_begin(), llvm::GraphTraits< Inverse< BasicBlock * > >::child_begin(), llvm::GraphTraits< Inverse< const BasicBlock * > >::child_begin(), llvm::CFGViewPredecessors< InverseGraph >::child_begin(), CloneAndPruneIntoFromInst(), computeLiveInValues(), ComputePostOrders(), llvm::DominatorTree::dominates(), eliminateRecursiveTailCall(), ensureValueAvailableInSuccessor(), llvm::CodeExtractor::findOrCreateBlockForHoisting(), llvm::SSAUpdaterTraits< SSAUpdater >::FindPredecessorBlocks(), findUnconditionalPreds(), FoldBranchToCommonDest(), foldReturnAndProcessPred(), FoldTwoEntryPHINode(), GetIfCondition(), llvm::Loop::getIncomingAndBackEdge(), llvm::LazyValueInfo::getPredicateAt(), llvm::BasicBlock::getSinglePredecessor(), llvm::BasicBlock::getUniquePredecessor(), llvm::SSAUpdater::GetValueInMiddleOfBlock(), llvm::BasicBlock::hasNPredecessors(), llvm::BasicBlock::hasNPredecessorsOrMore(), InlineFunction(), InsertPreheaderForLoop(), insertTrivialPHIs(), insertUniqueBackedgeBlock(), isCriticalEdge(), isFullPostDominator(), llvm::HardwareLoopInfo::isHardwareLoopCandidate(), isIndirectBrTarget(), llvm::Interval::isLoop(), isSCCHeader(), IsValueFullyAvailableInBlock(), memoryIsNotModifiedBetween(), MergeBasicBlockIntoOnlyPred(), mergeConditionalStoreToAddress(), mergeEmptyReturnBlocks(), pred_empty(), pred_size(), predecessors(), llvm::JumpThreadingPass::ProcessGuards(), processSwitch(), removeEmptyCleanup(), llvm::BasicBlock::removePredecessor(), reuseTableCompare(), rewritePHIs(), separateNestedLoop(), SimplifyCondBranchToCondBranch(), simplifyOneLoop(), llvm::JumpThreadingPass::SimplifyPartiallyRedundantLoad(), SplitCriticalEdge(), SplitLandingPadPredecessors(), splitPredecessorsOfLoopExit(), TryToMergeLandingPad(), TryToSimplifyUncondBranchFromEmptyBlock(), llvm::MemorySSAUpdater::updateForClonedLoop(), and llvm::MemorySSA::verifyDefUses().

◆ pred_empty()

bool llvm::pred_empty ( const BasicBlock BB)
inline

◆ pred_end() [1/3]

pred_iterator llvm::pred_end ( BasicBlock BB)
inline

Definition at line 112 of file CFG.h.

◆ pred_end() [2/3]

const_pred_iterator llvm::pred_end ( const BasicBlock BB)
inline

Definition at line 113 of file CFG.h.

◆ pred_end() [3/3]

Interval::pred_iterator llvm::pred_end ( Interval I)
inline

Definition at line 115 of file Interval.h.

References I.

Referenced by addBlockAndPredsToSet(), CanPropagatePredecessorsForPHIs(), canSplitPredecessors(), llvm::CFGViewPredecessors< InverseGraph >::child_begin(), llvm::GraphTraits< Inverse< Interval * > >::child_end(), llvm::GraphTraits< Inverse< BasicBlock * > >::child_end(), llvm::GraphTraits< Inverse< const BasicBlock * > >::child_end(), llvm::CFGViewPredecessors< InverseGraph >::child_end(), CloneAndPruneIntoFromInst(), computeLiveInValues(), llvm::DominatorTree::dominates(), eliminateRecursiveTailCall(), llvm::CodeExtractor::findOrCreateBlockForHoisting(), llvm::SSAUpdaterTraits< SSAUpdater >::FindPredecessorBlocks(), findUnconditionalPreds(), FoldBranchToCommonDest(), foldReturnAndProcessPred(), GetIfCondition(), llvm::Loop::getIncomingAndBackEdge(), llvm::LazyValueInfo::getPredicateAt(), llvm::BasicBlock::getSinglePredecessor(), llvm::BasicBlock::getUniquePredecessor(), llvm::SSAUpdater::GetValueInMiddleOfBlock(), llvm::BasicBlock::hasNPredecessors(), llvm::BasicBlock::hasNPredecessorsOrMore(), InlineFunction(), InsertPreheaderForLoop(), insertTrivialPHIs(), insertUniqueBackedgeBlock(), isCriticalEdge(), isFullPostDominator(), llvm::HardwareLoopInfo::isHardwareLoopCandidate(), isIndirectBrTarget(), llvm::Interval::isLoop(), isSCCHeader(), IsValueFullyAvailableInBlock(), memoryIsNotModifiedBetween(), MergeBasicBlockIntoOnlyPred(), mergeConditionalStoreToAddress(), mergeEmptyReturnBlocks(), pred_empty(), pred_size(), predecessors(), llvm::JumpThreadingPass::ProcessGuards(), processSwitch(), removeEmptyCleanup(), llvm::BasicBlock::removePredecessor(), reuseTableCompare(), rewritePHIs(), separateNestedLoop(), SimplifyCondBranchToCondBranch(), simplifyOneLoop(), llvm::JumpThreadingPass::SimplifyPartiallyRedundantLoad(), SplitCriticalEdge(), SplitLandingPadPredecessors(), splitPredecessorsOfLoopExit(), TryToMergeLandingPad(), TryToSimplifyUncondBranchFromEmptyBlock(), llvm::MemorySSAUpdater::updateForClonedLoop(), and llvm::MemorySSA::verifyDefUses().

◆ pred_size()

unsigned llvm::pred_size ( const BasicBlock BB)
inline

Get the number of predecessors of BB.

This is a linear time operation. Use BasicBlock::hasNPredecessors() or hasNPredecessorsOrMore if able.

Definition at line 121 of file CFG.h.

References pred_begin(), and pred_end().

Referenced by CloneAndPruneIntoFromInst(), findBasePointer(), FoldBranchToCommonDest(), GetBestDestForJumpOnUndef(), and llvm::MemorySSAUpdater::wireOldPredecessorsToNewImmediatePredecessor().

◆ predecessors() [1/2]

pred_range llvm::predecessors ( BasicBlock BB)
inline

◆ predecessors() [2/2]

pred_const_range llvm::predecessors ( const BasicBlock BB)
inline

Definition at line 127 of file CFG.h.

References pred_begin(), and pred_end().

◆ predicatesFoldable()

bool llvm::predicatesFoldable ( CmpInst::Predicate  P1,
CmpInst::Predicate  P2 
)

Return true if both predicates match sign or if at least one of them is an equality comparison (which is signless).

Definition at line 60 of file CmpInstAnalysis.cpp.

References llvm::ICmpInst::isEquality(), and llvm::CmpInst::isSigned().

◆ PrepareToSplitEntryBlock()

BasicBlock::iterator llvm::PrepareToSplitEntryBlock ( BasicBlock BB,
BasicBlock::iterator  IP 
)

Instrumentation passes often insert conditional checks into entry blocks.

Call this function before splitting the entry block to move instructions that must remain in the entry block up before the split point. Static allocas and llvm.localescape calls, for example, must remain in the entry block.

Definition at line 41 of file Instrumentation.cpp.

References assert(), llvm::BasicBlock::end(), llvm::Function::getEntryBlock(), llvm::BasicBlock::getParent(), I, and moveBeforeInsertPoint().

◆ prettyPrintRegisterOp()

static bool llvm::prettyPrintRegisterOp ( raw_ostream OS,
uint8_t  Opcode,
uint64_t  Operands[2],
const MCRegisterInfo *  MRI,
bool  isEH 
)
static

Definition at line 205 of file DWARFExpression.cpp.

References format().

Referenced by llvm::DWARFExpression::Operation::print().

◆ PrintDomTree()

template<class NodeT >
void llvm::PrintDomTree ( const DomTreeNodeBase< NodeT > *  N,
raw_ostream O,
unsigned  Lev 
)

Definition at line 180 of file GenericDomTree.h.

References I, llvm::raw_ostream::indent(), and N.

◆ printLLVMNameWithoutPrefix()

void llvm::printLLVMNameWithoutPrefix ( raw_ostream OS,
StringRef  Name 
)

Print out a name of an LLVM value without any prefixes.

The name is surrounded with ""'s and escaped if it has any special or non-printable characters in it.

Definition at line 397 of file AsmWriter.cpp.

References assert().

Referenced by PrintLLVMName().

◆ printLoop()

void llvm::printLoop ( Loop L,
raw_ostream OS,
const std::string &  Banner = "" 
)

◆ PrintRecyclerStats()

void llvm::PrintRecyclerStats ( size_t  Size,
size_t  Align,
size_t  FreeListSize 
)

PrintRecyclingAllocatorStats - Helper for RecyclingAllocator for printing statistics.

Definition at line 31 of file Allocator.cpp.

References errs().

Referenced by llvm::Recycler< T, Size, Align >::PrintStats().

◆ programUndefinedIfFullPoison()

bool llvm::programUndefinedIfFullPoison ( const Instruction PoisonI)

Return true if this function can prove that if PoisonI is executed and yields a full-poison value (all bits poison), then that will trigger undefined behavior.

Note that this currently only considers the basic block that is the parent of I.

Definition at line 4384 of file ValueTracking.cpp.

References llvm::BasicBlock::end(), llvm::BasicBlock::getFirstNonPHI(), llvm::Instruction::getParent(), llvm::BasicBlock::getSingleSuccessor(), I, isGuaranteedToTransferExecutionToSuccessor(), MaxDepth, mustTriggerUB(), and propagatesFullPoison().

◆ promoteCall()

Instruction * llvm::promoteCall ( CallSite  CS,
Function Callee,
CastInst **  RetBitCast = nullptr 
)

Promote the given indirect call site to unconditionally call Callee.

This function promotes the given call site, returning the direct call or invoke instruction. If the function type of the call site doesn't match that of the callee, bitcast instructions are inserted where appropriate. If RetBitCast is non-null, it will be used to store the return value bitcast, if created.

Definition at line 365 of file CallPromotionUtils.cpp.

References llvm::AttrBuilder::addByValAttr(), assert(), llvm::CastInst::CreateBitOrPointerCast(), createRetBitCast(), llvm::AttributeList::get(), llvm::AttributeSet::get(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, IterTy >::getArgument(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, IterTy >::getAttributes(), llvm::AttrBuilder::getByValType(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, IterTy >::getCalledFunction(), llvm::AttributeList::getFnAttributes(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, IterTy >::getFunctionType(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, IterTy >::getInstruction(), llvm::AttributeList::getParamAttributes(), llvm::Value::getType(), llvm::Type::isVoidTy(), llvm::LLVMContext::MD_callees, llvm::LLVMContext::MD_prof, llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, IterTy >::mutateFunctionType(), llvm::AttrBuilder::remove(), llvm::AttributeList::ReturnIndex, llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, IterTy >::setArgument(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, IterTy >::setAttributes(), llvm::Instruction::setMetadata(), and llvm::AttributeFuncs::typeIncompatible().

Referenced by promoteCallWithIfThenElse().

◆ promoteCallWithIfThenElse()

Instruction * llvm::promoteCallWithIfThenElse ( CallSite  CS,
Function Callee,
MDNode BranchWeights = nullptr 
)

Promote the given indirect call site to conditionally call Callee.

This function creates an if-then-else structure at the location of the call site. The original call site is moved into the "else" block. A clone of the indirect call site is promoted, placed in the "then" block, and returned. If BranchWeights is non-null, it will be used to set !prof metadata on the new conditional branch.

Definition at line 449 of file CallPromotionUtils.cpp.

References promoteCall(), and versionCallSite().

Referenced by llvm::pgo::promoteIndirectCall().

◆ promoteLoopAccessesToScalars()

bool llvm::promoteLoopAccessesToScalars ( const SmallSetVector< Value *, 8 > &  PointerMustAliases,
SmallVectorImpl< BasicBlock * > &  ExitBlocks,
SmallVectorImpl< Instruction * > &  InsertPts,
SmallVectorImpl< MemoryAccess * > &  MSSAInsertPts,
PredIteratorCache PIC,
LoopInfo LI,
DominatorTree DT,
const TargetLibraryInfo TLI,
Loop CurLoop,
AliasSetTracker CurAST,
MemorySSAUpdater MSSAU,
ICFLoopSafetyInfo SafetyInfo,
OptimizationRemarkEmitter ORE 
)

Try to promote memory values to scalars by sinking stores out of the loop and moving loads to before the loop.

We do this by looping over the stores in the loop, looking for stores to Must pointers which are loop invariant. It takes a set of must-alias values, Loop exit blocks vector, loop exit blocks insertion point vector, PredIteratorCache, LoopInfo, DominatorTree, Loop, AliasSet information for all instructions of the loop and loop safety information as arguments. Diagnostics is emitted via ORE. It returns changed status.

We do this by looping over the stores in the loop, looking for stores to Must pointers which are loop invariant.

Definition at line 1850 of file LICM.cpp.

References llvm::ICFLoopSafetyInfo::anyBlockMayThrow(), assert(), llvm::LoopBase< BlockT, LoopT >::contains(), llvm::MemorySSAUpdater::createMemoryAccessInBB(), dbgs(), DEBUG_TYPE, llvm::DominatorTree::dominates(), llvm::OptimizationRemarkEmitter::emit(), llvm::MemorySSA::End, eraseInstruction(), llvm::Instruction::getAAMetadata(), llvm::DataLayout::getABITypeAlignment(), llvm::Module::getDataLayout(), llvm::LoopBase< BlockT, LoopT >::getLoopPreheader(), llvm::MemorySSAUpdater::getMemorySSA(), llvm::BasicBlock::getModule(), llvm::Value::getName(), llvm::User::getOperand(), llvm::Instruction::getParent(), llvm::Type::getPointerElementType(), llvm::BasicBlock::getTerminator(), llvm::Value::getType(), llvm::DataLayout::getTypeStoreSize(), GetUnderlyingObject(), llvm::MemorySSAUpdater::insertUse(), isAllocLikeFn(), isDereferenceableAndAlignedPointer(), llvm::ICFLoopSafetyInfo::isGuaranteedToExecute(), isSafeToExecuteUnconditionally(), LLVM_DEBUG, PointerMayBeCaptured(), llvm::Instruction::setAAMetadata(), llvm::LoadInst::setAlignment(), llvm::Instruction::setDebugLoc(), llvm::LoadInst::setOrdering(), SSA, Unordered, llvm::Value::use_empty(), llvm::Value::users(), llvm::MemorySSA::verifyMemorySSA(), and VerifyMemorySSA.

◆ PromoteMemToReg()

void llvm::PromoteMemToReg ( ArrayRef< AllocaInst * >  Allocas,
DominatorTree DT,
AssumptionCache AC = nullptr 
)

Promote the specified list of alloca instructions into scalar registers, inserting PHI nodes as appropriate.

This function makes use of DominanceFrontier information. This function does not modify the CFG of the function at all. All allocas must be from the same function.

Definition at line 1000 of file PromoteMemoryToRegister.cpp.

Referenced by promoteMemoryToRegister(), and relocationViaAlloca().

◆ propagateIRFlags()

void llvm::propagateIRFlags ( Value I,
ArrayRef< Value * >  VL,
Value OpValue = nullptr 
)

Get the intersection (logical and) of all of the potential IR flags of each scalar operation (VL) that will be converted into a vector (I).

If OpValue is non-null, we only consider operations similar to OpValue when intersecting. Flag set: NSW, NUW, exact, and all of fast-math.

Definition at line 923 of file LoopUtils.cpp.

References I.

Referenced by getOrderedReduction(), and getShuffleReduction().

◆ propagateMetadata()

Instruction * llvm::propagateMetadata ( Instruction Inst,
ArrayRef< Value * >  VL 
)

Specifically, let Kinds = [MD_tbaa, MD_alias_scope, MD_noalias, MD_fpmath, MD_nontemporal, MD_access_group].

For K in Kinds, we get the MDNode for K from each of the elements of VL, compute their "intersection" (i.e., the most generic metadata value that covers all of the individual values), and set I's metadata for M equal to the intersection value.

This function always sets a (possibly null) value for each K in Kinds.

Returns
I after propagating metadata from VL.

Definition at line 592 of file VectorUtils.cpp.

References llvm::Instruction::getAllMetadataOtherThanDebugLoc(), llvm::Instruction::getMetadata(), llvm::MDNode::getMostGenericAliasScope(), llvm::MDNode::getMostGenericFPMath(), llvm::MDNode::getMostGenericTBAA(), llvm::MDNode::intersect(), intersectAccessGroups(), llvm_unreachable, llvm::LLVMContext::MD_access_group, llvm::LLVMContext::MD_alias_scope, llvm::LLVMContext::MD_fpmath, llvm::LLVMContext::MD_invariant_load, llvm::LLVMContext::MD_noalias, llvm::LLVMContext::MD_nontemporal, llvm::LLVMContext::MD_tbaa, and llvm::Instruction::setMetadata().

Referenced by llvm::InterleaveGroup< InstTy >::addMetadata(), llvm::InnerLoopVectorizer::addMetadata(), and propagateMetadata().

◆ propagatesFullPoison()

bool llvm::propagatesFullPoison ( const Instruction I)

Return true if this function can prove that I is guaranteed to yield full-poison (all bits poison) if at least one of its operands are full-poison (all bits poison).

The exact rules for how poison propagates through instructions have not been settled as of 2015-07-10, so this function is conservative and only considers poison to be propagated in uncontroversial cases. There is no attempt to track values that may be only partially poison.

Definition at line 4314 of file ValueTracking.cpp.

References I.

Referenced by mustExecuteUBIfPoisonOnPathTo(), programUndefinedIfFullPoison(), and rewrite().

◆ pruneCache()

bool llvm::pruneCache ( StringRef  Path,
CachePruningPolicy  Policy 
)

Peform pruning using the supplied policy, returns true if pruning occurred, i.e.

Prune the cache of files that haven't been accessed in a long time.

if Policy.Interval was expired.

As a safeguard against data loss if the user specifies the wrong directory as their cache directory, this function will ignore files not matching the pattern "llvmcache-*".

Definition at line 144 of file CachePruning.cpp.

References llvm::sys::path::append(), dbgs(), llvm::sys::fs::disk_space(), llvm::CachePruningPolicy::Expiration, llvm::sys::path::filename(), llvm::sys::fs::space_info::free, llvm::sys::fs::basic_file_status::getLastModificationTime(), llvm::CachePruningPolicy::Interval, llvm::sys::fs::is_directory(), LLVM_DEBUG, llvm::CachePruningPolicy::MaxSizeBytes, llvm::CachePruningPolicy::MaxSizeFiles, llvm::CachePruningPolicy::MaxSizePercentageOfAvailableSpace, llvm::sys::path::native, llvm::sys::fs::remove(), report_fatal_error(), llvm::sys::fs::status(), and writeTimestampFile().

Referenced by llvm::ThinLTOCodeGenerator::run().

◆ readExponent()

static int llvm::readExponent ( StringRef::iterator  begin,
StringRef::iterator  end 
)
static

Definition at line 230 of file APFloat.cpp.

References assert(), decDigitValue(), and value.

Referenced by interpretDecimal().

◆ recognizeBSwapOrBitReverseIdiom()

bool llvm::recognizeBSwapOrBitReverseIdiom ( Instruction I,
bool  MatchBSwaps,
bool  MatchBitReversals,
SmallVectorImpl< Instruction * > &  InsertedInsts 
)

Try to match a bswap or bitreverse idiom.

If an idiom is matched, an intrinsic call is inserted before I. Any added instructions are returned in InsertedInsts. They will all have been added to a basic block.

A bitreverse idiom normally requires around 2*BW nodes to be searched (where BW is the bitwidth of the integer type). A bswap idiom requires anywhere up to BW / 4 nodes to be searched, so is significantly faster.

This function returns true on a successful match or false otherwise.

Definition at line 2782 of file Local.cpp.

References bitTransformIsCorrectForBitReverse(), bitTransformIsCorrectForBSwap(), collectBitParts(), llvm::CallInst::Create(), llvm::CastInst::Create(), F, llvm::IntegerType::getBitWidth(), llvm::Intrinsic::getDeclaration(), llvm::Operator::getOpcode(), llvm::Value::getType(), and I.

◆ RecursivelyDeleteDeadPHINode()

bool llvm::RecursivelyDeleteDeadPHINode ( PHINode PN,
const TargetLibraryInfo TLI = nullptr 
)

If the specified value is an effectively dead PHI node, due to being a def-use chain of single-use nodes that either forms a cycle or is terminated by a trivially dead instruction, delete it.

RecursivelyDeleteDeadPHINode - If the specified value is an effectively dead PHI node, due to being a def-use chain of single-use nodes that either forms a cycle or is terminated by a trivially dead instruction, delete it.

If that makes any of its operands trivially dead, delete them too, recursively. Return true if a change was made.

Definition at line 517 of file Local.cpp.

References areAllUsesEqual(), llvm::UndefValue::get(), I, and RecursivelyDeleteTriviallyDeadInstructions().

Referenced by DeleteDeadPHIs().

◆ RecursivelyDeleteTriviallyDeadInstructions() [1/2]

void llvm::RecursivelyDeleteTriviallyDeadInstructions ( SmallVectorImpl< Instruction * > &  DeadInsts,
const TargetLibraryInfo TLI = nullptr,
MemorySSAUpdater MSSAU = nullptr 
)

Delete all of the instructions in DeadInsts, and all other instructions that deleting these in turn causes to be trivially dead.

The initial instructions in the provided vector must all have empty use lists and satisfy isInstructionTriviallyDead.

DeadInsts will be used as scratch storage for this routine and will be empty afterward.

Definition at line 447 of file Local.cpp.

References assert(), I, isInstructionTriviallyDead(), llvm::MemorySSAUpdater::removeMemoryAccess(), salvageDebugInfo(), and llvm::Value::use_empty().

◆ RecursivelyDeleteTriviallyDeadInstructions() [2/2]

bool llvm::RecursivelyDeleteTriviallyDeadInstructions ( Value V,
const TargetLibraryInfo TLI = nullptr,
MemorySSAUpdater MSSAU = nullptr 
)

If the specified value is a trivially dead instruction, delete it.

RecursivelyDeleteTriviallyDeadInstructions - If the specified value is a trivially dead instruction, delete it.

If that makes any of its operands trivially dead, delete them too, recursively. Return true if any instructions were deleted.

Definition at line 434 of file Local.cpp.

References I, isInstructionTriviallyDead(), and RecursivelyDeleteTriviallyDeadInstructions().

Referenced by ConstantFoldTerminator(), llvm::objcarc::EraseInstruction(), EraseTerminatorAndDCECond(), RecursivelyDeleteDeadPHINode(), RecursivelyDeleteTriviallyDeadInstructions(), runImpl(), simplifyLoopAfterUnroll(), and simplifyLoopInst().

◆ recursivelySimplifyInstruction()

bool llvm::recursivelySimplifyInstruction ( Instruction I,
const TargetLibraryInfo TLI = nullptr,
const DominatorTree DT = nullptr,
AssumptionCache AC = nullptr 
)

Recursively attempt to simplify an instruction.

This routine uses SimplifyInstruction to simplify 'I', and if successful replaces uses of 'I' with the simplified value. It then recurses on each of the users impacted. It returns true if any simplifications were performed.

Definition at line 5289 of file InstructionSimplify.cpp.

References I, and replaceAndRecursivelySimplifyImpl().

Referenced by RemovePredecessorAndSimplify().

◆ RegionGraphTraits()

llvm::RegionGraphTraits ( Region  ,
RegionNode   
)

◆ RegionNodeGraphTraits()

llvm::RegionNodeGraphTraits ( RegionNode  ,
BasicBlock  ,
Region   
)

◆ RemapFunction()

void llvm::RemapFunction ( Function F,
ValueToValueMapTy VM,
RemapFlags  Flags = RF_None,
ValueMapTypeRemapper TypeMapper = nullptr,
ValueMaterializer Materializer = nullptr 
)
inline

Remap the operands, metadata, arguments, and instructions of a function.

Calls MapValue() on prefix data, prologue data, and personality function; calls MapMetadata() on each attached MDNode; remaps the argument types using the provided TypeMapper; and calls RemapInstruction() on every instruction.

Definition at line 263 of file ValueMapper.h.

References F, and llvm::ValueMapper::remapFunction().

◆ RemapInstruction()

void llvm::RemapInstruction ( Instruction I,
ValueToValueMapTy VM,
RemapFlags  Flags = RF_None,
ValueMapTypeRemapper TypeMapper = nullptr,
ValueMaterializer Materializer = nullptr 
)
inline

Convert the instruction operands from referencing the current values into those specified by VM.

If RF_IgnoreMissingLocals is set and an operand can't be found via MapValue(), use the old value. Otherwise assert that this doesn't happen.

Note that MapValue() only returns nullptr for SSA values missing from VM.

Definition at line 250 of file ValueMapper.h.

References I, and llvm::ValueMapper::remapInstruction().

Referenced by buildClonedLoopBlocks(), CloneAndPruneIntoFromInst(), CloneFunctionInto(), FoldBranchToCommonDest(), remapInstructionsInBlocks(), and UnrollRuntimeLoopRemainder().

◆ remapInstruction()

void llvm::remapInstruction ( Instruction I,
ValueToValueMapTy VMap 
)

Convert the instruction operands from referencing the current values into those specified by VMap.

Definition at line 67 of file LoopUnroll.cpp.

References llvm::ValueMap< KeyT, ValueT, Config >::end(), llvm::ValueMap< KeyT, ValueT, Config >::find(), llvm::MetadataAsValue::get(), llvm::ValueAsMetadata::get(), I, llvm::ValueMapIterator< DenseMapT, KeyT >::ValueTypeProxy::second, and wrap().

Referenced by UnrollAndJamLoop(), and UnrollLoop().

◆ remapInstructionsInBlocks()

void llvm::remapInstructionsInBlocks ( const SmallVectorImpl< BasicBlock * > &  Blocks,
ValueToValueMapTy VMap 
)

Remaps instructions in Blocks using the mapping in VMap.

Definition at line 723 of file CloneFunction.cpp.

References RemapInstruction(), RF_IgnoreMissingLocals, and RF_NoModuleLevelChanges.

Referenced by peelLoop(), and llvm::LoopVersioning::versionLoop().

◆ remove_bad_alloc_error_handler()

void llvm::remove_bad_alloc_error_handler ( )

Restores default bad alloc error handling behavior.

Definition at line 138 of file ErrorHandling.cpp.

References BadAllocErrorHandler, BadAllocErrorHandlerMutex, and BadAllocErrorHandlerUserData.

◆ remove_fatal_error_handler()

void llvm::remove_fatal_error_handler ( )

Restores default error handling behaviour.

Definition at line 73 of file ErrorHandling.cpp.

References ErrorHandler, ErrorHandlerMutex, and ErrorHandlerUserData.

Referenced by LLVMResetFatalErrorHandler(), and llvm::ScopedFatalErrorHandler::~ScopedFatalErrorHandler().

◆ removeAllNonTerminatorAndEHPadInstructions()

unsigned llvm::removeAllNonTerminatorAndEHPadInstructions ( BasicBlock BB)

◆ RemovePredecessorAndSimplify()

void llvm::RemovePredecessorAndSimplify ( BasicBlock BB,
BasicBlock Pred,
DomTreeUpdater DTU = nullptr 
)

Like BasicBlock::removePredecessor, this method is called when we're about to delete Pred as a predecessor of BB.

RemovePredecessorAndSimplify - Like BasicBlock::removePredecessor, this method is called when we're about to delete Pred as a predecessor of BB.

If BB contains any PHI nodes, this drops the entries in the PHI nodes for Pred.

Unlike the removePredecessor method, this attempts to simplify uses of PHI nodes that collapse into identity values. For example, if we have: x = phi(1, 0, 0, 0) y = and x, z

.. and delete the predecessor corresponding to the '1', this will attempt to recursively fold the 'and' to 0.

If BB contains any PHI nodes, this drops the entries in the PHI nodes for Pred.

Unlike the removePredecessor method, this attempts to simplify uses of PHI nodes that collapse into identity values. For example, if we have: x = phi(1, 0, 0, 0) y = and x, z

.. and delete the predecessor corresponding to the '1', this will attempt to recursively fold the and to 0.

Definition at line 647 of file Local.cpp.

References llvm::DomTreeUpdater::applyUpdatesPermissive(), llvm::BasicBlock::begin(), llvm::BasicBlock::front(), recursivelySimplifyInstruction(), and llvm::BasicBlock::removePredecessor().

◆ removeUnreachableBlocks()

bool llvm::removeUnreachableBlocks ( Function F,
LazyValueInfo LVI = nullptr,
DomTreeUpdater DTU = nullptr,
MemorySSAUpdater MSSAU = nullptr 
)

Remove all blocks that can not be reached from the function's entry.

removeUnreachableBlocks - Remove blocks that are not reachable, even if they are in a dead cycle.

Returns true if any basic block was removed.

Return true if a change was made, false otherwise. If LVI is passed, this function preserves LazyValueInfo after modifying the CFG.

Definition at line 2228 of file Local.cpp.

References llvm::DomTreeUpdater::applyUpdatesPermissive(), assert(), llvm::DomTreeUpdater::deleteBB(), Deleted, llvm::LazyValueInfo::eraseBlock(), F, I, llvm::DomTreeUpdater::isBBPendingDeletion(), markAliveBlocks(), llvm::MemorySSAUpdater::removeBlocks(), succ_empty(), and successors().

Referenced by addMustTailToCoroResumes(), OptimizeFunctions(), postSplitCleanup(), llvm::RewriteStatepointsForGC::runOnFunction(), and simplifyFunctionCFG().

◆ removeUnwindEdge()

void llvm::removeUnwindEdge ( BasicBlock BB,
DomTreeUpdater DTU = nullptr 
)

Replace 'BB's terminator with one that does not have an unwind successor block.

Rewrites invoke to call, etc. Updates any PHIs in unwind successor.

Parameters
BBBlock whose terminator will be replaced. Its terminator must have an unwind successor.

Definition at line 2188 of file Local.cpp.

References llvm::DomTreeUpdater::applyUpdatesPermissive(), changeToCall(), llvm::CleanupReturnInst::Create(), llvm::CatchSwitchInst::Create(), llvm::Instruction::eraseFromParent(), llvm::Instruction::getDebugLoc(), llvm::BasicBlock::getTerminator(), llvm_unreachable, llvm::BasicBlock::removePredecessor(), llvm::Value::replaceAllUsesWith(), llvm::Instruction::setDebugLoc(), and llvm::Value::takeName().

Referenced by removeEmptyCleanup(), and SimplifyFunction().

◆ renameModuleForThinLTO()

bool llvm::renameModuleForThinLTO ( Module M,
const ModuleSummaryIndex Index,
SetVector< GlobalValue * > *  GlobalsToImport = nullptr 
)

Perform in-place global value handling on the given Module for exported local functions renamed and promoted for ThinLTO.

Definition at line 309 of file FunctionImportUtils.cpp.

References llvm::FunctionImportGlobalProcessing::run().

Referenced by doImportingForModule(), llvm::FunctionImporter::importFunctions(), and llvm::lto::thinBackend().

◆ replaceAllDbgUsesWith()

bool llvm::replaceAllDbgUsesWith ( Instruction From,
Value To,
Instruction DomPoint,
DominatorTree DT 
)

Point debug users of From to To or salvage them.

Use this function only when replacing all uses of From with To, with a guarantee that From is going to be deleted.

Follow these rules to prevent use-before-def of To: . If To is a linked Instruction, set DomPoint to To. . If To is an unlinked Instruction, set DomPoint to the Instruction To will be inserted after. . If To is not an Instruction (e.g a Constant), the choice of DomPoint is arbitrary. Pick From for simplicity.

If a debug user cannot be preserved without reordering variable updates or introducing a use-before-def, it is either salvaged (salvageDebugInfo) or deleted. Returns true if any debug users were updated.

Definition at line 1840 of file Local.cpp.

References llvm::DIExpression::appendToStack(), assert(), llvm::Instruction::getModule(), llvm::Type::getPrimitiveSizeInBits(), llvm::DIVariable::getSignedness(), llvm::Value::getType(), isBitCastSemanticsPreserving(), llvm::Type::isIntegerTy(), llvm::Value::isUsedByMetadata(), None, and rewriteDebugUsers().

Referenced by llvm::InstCombiner::commonCastTransforms(), and llvm::InstCombiner::visitZExt().

◆ replaceAndRecursivelySimplify()

bool llvm::replaceAndRecursivelySimplify ( Instruction I,
Value SimpleV,
const TargetLibraryInfo TLI = nullptr,
const DominatorTree DT = nullptr,
AssumptionCache AC = nullptr,
SmallSetVector< Instruction *, 8 > *  UnsimplifiedUsers = nullptr 
)

Replace all uses of 'I' with 'SimpleV' and simplify the uses recursively.

This first performs a normal RAUW of I with SimpleV. It then recursively attempts to simplify those users updated by the operation. The 'I' instruction must not be equal to the simplified value 'SimpleV'. If UnsimplifiedUsers is provided, instructions that could not be simplified are added to it.

The function returns true if any simplifications were performed.

Definition at line 5296 of file InstructionSimplify.cpp.

References assert(), I, and replaceAndRecursivelySimplifyImpl().

Referenced by replaceWithConstant().

◆ replaceCreatedSSACopys()

static void llvm::replaceCreatedSSACopys ( PredicateInfo PredInfo,
Function F 
)
static

◆ replaceDbgDeclare()

bool llvm::replaceDbgDeclare ( Value Address,
Value NewAddress,
Instruction InsertBefore,
DIBuilder Builder,
uint8_t  DIExprFlags,
int  Offset 
)

Replaces llvm.dbg.declare instruction when the address it describes is replaced with a new value.

If Deref is true, an additional DW_OP_deref is prepended to the expression. If Offset is non-zero, a constant displacement is added to the expression (between the optional Deref operations). Offset can be negative.

Definition at line 1553 of file Local.cpp.

References Address, assert(), llvm::Instruction::eraseFromParent(), FindDbgAddrUses(), and llvm::DIExpression::prepend().

Referenced by replaceDbgDeclareForAlloca().

◆ replaceDbgDeclareForAlloca()

bool llvm::replaceDbgDeclareForAlloca ( AllocaInst AI,
Value NewAllocaAddress,
DIBuilder Builder,
uint8_t  DIExprFlags,
int  Offset 
)

Replaces llvm.dbg.declare instruction when the alloca it describes is replaced with a new value.

If Deref is true, an additional DW_OP_deref is prepended to the expression. If Offset is non-zero, a constant displacement is added to the expression (between the optional Deref operations). Offset can be negative. The new llvm.dbg.declare is inserted immediately after AI.

Definition at line 1573 of file Local.cpp.

References replaceDbgDeclare().

Referenced by InlineFunction().

◆ replaceDbgUsesWithUndef()

bool llvm::replaceDbgUsesWithUndef ( Instruction I)

Replace all the uses of an SSA value in @llvm.dbg intrinsics with undef.

This is useful for signaling that a variable, e.g. has been found dead and hence it's unavailable at a given program point. Returns true if the dbg values have been changed.

Definition at line 483 of file Local.cpp.

References findDbgUsers(), llvm::MetadataAsValue::get(), llvm::UndefValue::get(), llvm::ValueAsMetadata::get(), and I.

Referenced by AddReachableCodeToWorklist().

◆ replaceDbgValueForAlloca()

void llvm::replaceDbgValueForAlloca ( AllocaInst AI,
Value NewAllocaAddress,
DIBuilder Builder,
int  Offset = 0 
)

Replaces multiple llvm.dbg.value instructions when the alloca it describes is replaced with a new value.

If Offset is non-zero, a constant displacement is added to the expression (after the mandatory Deref). Offset can be negative. New llvm.dbg.value instructions are inserted at the locations of the instructions they replace.

Definition at line 1608 of file Local.cpp.

References llvm::Value::getContext(), llvm::MetadataAsValue::getIfExists(), llvm::LocalAsMetadata::getIfExists(), llvm::Use::getUser(), and replaceOneDbgValueForAlloca().

◆ replaceDominatedUsesWith() [1/2]

unsigned llvm::replaceDominatedUsesWith ( Value From,
Value To,
DominatorTree DT,
const BasicBlock BB 
)

Replace each use of 'From' with 'To' if that use is dominated by the end of the given BasicBlock.

Returns the number of replacements made.

Definition at line 2470 of file Local.cpp.

References I, and llvm::DominatorTreeBase< NodeT, IsPostDom >::properlyDominates().

◆ replaceDominatedUsesWith() [2/2]

unsigned llvm::replaceDominatedUsesWith ( Value From,
Value To,
DominatorTree DT,
const BasicBlockEdge Edge 
)

Replace each use of 'From' with 'To' if that use is dominated by the given edge.

Returns the number of replacements made.

Definition at line 2461 of file Local.cpp.

References llvm::DominatorTree::dominates().

Referenced by sinkInstruction().

◆ ReplaceInstWithInst() [1/2]

void llvm::ReplaceInstWithInst ( BasicBlock::InstListType BIL,
BasicBlock::iterator BI,
Instruction I 
)

Replace the instruction specified by BI with the instruction specified by I.

Copies DebugLoc from BI to I, if I doesn't already have a DebugLoc. The original instruction is deleted and BI is updated to point to the new instruction.

Definition at line 299 of file BasicBlockUtils.cpp.

References assert(), I, and ReplaceInstWithValue().

Referenced by llvm::InnerLoopVectorizer::createVectorizedLoopSkeleton(), llvm::InnerLoopVectorizer::emitMemRuntimeChecks(), llvm::InnerLoopVectorizer::emitMinimumIterationCountCheck(), llvm::InnerLoopVectorizer::emitSCEVChecks(), llvm::VPBasicBlock::execute(), llvm::VPBranchOnMaskRecipe::execute(), ReplaceInstWithInst(), simplifyTerminatorLeadingToRet(), SplitBlockAndInsertIfThen(), and SplitBlockAndInsertIfThenElse().

◆ ReplaceInstWithInst() [2/2]

void llvm::ReplaceInstWithInst ( Instruction From,
Instruction To 
)

Replace the instruction specified by From with the instruction specified by To.

Copies DebugLoc from BI to I, if I doesn't already have a DebugLoc.

Definition at line 319 of file BasicBlockUtils.cpp.

References llvm::BasicBlock::getInstList(), llvm::Instruction::getParent(), and ReplaceInstWithInst().

◆ ReplaceInstWithValue()

void llvm::ReplaceInstWithValue ( BasicBlock::InstListType BIL,
BasicBlock::iterator BI,
Value V 
)

Replace all uses of an instruction (specified by BI) with a value, then remove and delete the original instruction.

Definition at line 285 of file BasicBlockUtils.cpp.

References llvm::Value::hasName(), I, and llvm::Value::takeName().

Referenced by ReplaceInstWithInst().

◆ replaceNonLocalUsesWith()

unsigned llvm::replaceNonLocalUsesWith ( Instruction From,
Value To 
)

◆ replaceSymbolicStrideSCEV()

const SCEV * llvm::replaceSymbolicStrideSCEV ( PredicatedScalarEvolution PSE,
const ValueToValueMap PtrToStride,
Value Ptr,
Value OrigPtr = nullptr 
)

Return the SCEV corresponding to a pointer with the symbolic stride replaced with constant one, assuming the SCEV predicate associated with PSE is true.

If necessary this method will version the stride of the pointer according to PtrToStride and therefore add further predicates to PSE.

If OrigPtr is not null, use it to look up the stride value instead of Ptr. PtrToStride provides the mapping between the pointer value and its stride as collected by LoopVectorizationLegality::collectStridedAccess.

Definition at line 144 of file LoopAccessAnalysis.cpp.

References llvm::PredicatedScalarEvolution::addPredicate(), dbgs(), llvm::sys::path::const_iterator::end, llvm::ScalarEvolution::getEqualPredicate(), llvm::ScalarEvolution::getOne(), llvm::ScalarEvolution::getSCEV(), llvm::PredicatedScalarEvolution::getSCEV(), llvm::PredicatedScalarEvolution::getSE(), llvm::Value::getType(), LLVM_DEBUG, and stripIntegerCast().

Referenced by getPtrStride(), hasComputableBounds(), and llvm::RuntimePointerChecking::insert().

◆ report_bad_alloc_error()

void llvm::report_bad_alloc_error ( const char Reason,
bool  GenCrashDiag = true 
)

Reports a bad alloc error, calling any user defined bad alloc error handler.

In contrast to the generic 'report_fatal_error' functions, this function is expected to return, e.g. the user defined error handler throws an exception.

Note: When throwing an exception in the bad alloc handler, make sure that the following unwind succeeds, e.g. do not trigger additional allocations in the unwind chain.

If no error handler is installed (default), then a bad_alloc exception is thrown, if LLVM is compiled with exception support, otherwise an assertion is called.

Definition at line 146 of file ErrorHandling.cpp.

References BadAllocErrorHandler, BadAllocErrorHandlerMutex, BadAllocErrorHandlerUserData, and llvm_unreachable.

Referenced by out_of_memory_new_handler(), safe_calloc(), safe_malloc(), and safe_realloc().

◆ report_fatal_error() [1/5]

void llvm::report_fatal_error ( const char reason,
bool  gen_crash_diag = true 
)

Reports a serious error, calling any installed error handler.

These functions are intended to be used for error conditions which are outside the control of the compiler (I/O errors, invalid user input, etc.)

If no error handler is installed the default is to print the message to standard error, followed by a newline. After the error handler is called this function will call exit(1), it does not return.

Definition at line 81 of file ErrorHandling.cpp.

References report_fatal_error().

◆ report_fatal_error() [2/5]

void llvm::report_fatal_error ( const std::string &  reason,
bool  gen_crash_diag = true 
)

Definition at line 85 of file ErrorHandling.cpp.

References report_fatal_error().

◆ report_fatal_error() [3/5]

void llvm::report_fatal_error ( const Twine &  reason,
bool  gen_crash_diag = true 
)

◆ report_fatal_error() [4/5]

void llvm::report_fatal_error ( Error  Err,
bool  gen_crash_diag = true 
)

Report a serious error, calling any installed error handler.

See ErrorHandling.h.

Definition at line 139 of file Error.cpp.

References assert(), logAllUnhandledErrors(), and report_fatal_error().

Referenced by llvm::ThinLTOCodeGenerator::addModule(), llvm::yaml::Stream::begin(), llvm::coro::buildCoroutineFrame(), buildFrameType(), llvm::coro::Shape::buildFrom(), buildModuleSummaryIndex(), computeDeadSymbols(), llvm::TargetMachineBuilder::create(), llvm::SpecialCaseList::createOrDie(), CreateZ3Solver(), doImportingForModule(), llvm::ThinLTOCodeGenerator::emitImports(), errorToErrorCode(), llvm::CodeExtractor::extractCodeRegion(), getAddrSpace(), llvm::GCOVOptions::getDefault(), getEntryForPercentile(), getInt(), getLeastCommonType(), getOrCreateInitFunction(), getPointerOperandIndex(), llvm::FunctionImporter::importFunctions(), inBytes(), insertCall(), insertSignalHandler(), insertSpills(), LLVMVerifyFunction(), LLVMVerifyModule(), loadFile(), llvm::lto::localCache(), moveSpillUsesAfterCoroBegin(), llvm::EscapeEnumerator::Next(), llvm::LTOCodeGenerator::optimize(), llvm::SymbolRewriter::RewriteMapParser::parse(), llvm::DWARFDebugFrame::parse(), llvm::sys::fs::recursive_directory_iterator::pop(), pruneCache(), removeTailCallAttribute(), report_fatal_error(), ReportError(), llvm::ThinLTOCodeGenerator::run(), llvm::AddressSanitizerPass::run(), llvm::LICMPass::run(), llvm::LoopIdiomRecognizePass::run(), llvm::LoopUnrollAndJamPass::run(), llvm::LoopFullUnrollPass::run(), llvm::VerifierPass::run(), split(), UpgradeDebugInfo(), llvm::AssumptionCacheTracker::verifyAnalysis(), llvm::ThinLTOCodeGenerator::writeGeneratedObject(), and llvm::raw_fd_ostream::~raw_fd_ostream().

◆ report_fatal_error() [5/5]

void llvm::report_fatal_error ( StringRef  reason,
bool  gen_crash_diag = true 
)

Definition at line 89 of file ErrorHandling.cpp.

References report_fatal_error().

◆ reportAndResetTimings()

void llvm::reportAndResetTimings ( raw_ostream OutStream = nullptr)

If -time-passes has been specified, report the timings immediately and then reset the timers to zero.

If timing is enabled, report the times collected up to now and then reset them.

By default it uses the stream created by CreateInfoOutputFile().

Definition at line 159 of file PassTimingInfo.cpp.

Referenced by llvm::LTOCodeGenerator::compileOptimized(), and llvm::ThinLTOCodeGenerator::run().

◆ RestorePrettyStackState()

void llvm::RestorePrettyStackState ( const void *  State)

Restores the topmost element of the "pretty" stack state to State, which should come from a previous call to SavePrettyStackState().

This is useful when using a CrashRecoveryContext in code that also uses PrettyStackTraceEntries, to make sure the stack that's printed if a crash happens after a crash that's been recovered by CrashRecoveryContext doesn't have frames on it that were added in code unwound by the CrashRecoveryContext.

Definition at line 259 of file PrettyStackTrace.cpp.

References PrettyStackTraceHead.

◆ reverseBits()

template<typename T >
T llvm::reverseBits ( Val)

Reverse the bits in Val.

Definition at line 268 of file MathExtras.h.

References BitReverseTable256.

◆ ReverseStackTrace()

PrettyStackTraceEntry * llvm::ReverseStackTrace ( PrettyStackTraceEntry Head)

Definition at line 63 of file PrettyStackTrace.cpp.

Referenced by PrintStack().

◆ right_justify()

FormattedString llvm::right_justify ( StringRef  Str,
unsigned  Width 
)
inline

right_justify - add spaces before string so total output is Width characters.

If Str is larger that Width, full string is written with no padding.

Definition at line 151 of file Format.h.

References llvm::FormattedString::JustifyRight.

Referenced by printSymbolizedStackTrace().

◆ runIPSCCP()

bool llvm::runIPSCCP ( Module M,
const DataLayout DL,
const TargetLibraryInfo TLI,
function_ref< AnalysisResultsForFn(Function &)>  getAnalysis 
)

◆ RunningWindows8OrGreater()

bool llvm::RunningWindows8OrGreater ( )

Determines if the program is running on Windows 8 or newer.

This reimplements one of the helpers in the Windows 8.1 SDK, which are intended to supercede raw calls to GetVersionEx. Old SDKs, Cygwin, and MinGW don't yet have VersionHelpers.h, so we have our own helper.

◆ safe_calloc()

LLVM_ATTRIBUTE_RETURNS_NONNULL void * llvm::safe_calloc ( size_t  Count,
size_t  Sz 
)
inline

◆ safe_malloc()

LLVM_ATTRIBUTE_RETURNS_NONNULL void * llvm::safe_malloc ( size_t  Sz)
inline

◆ safe_realloc()

LLVM_ATTRIBUTE_RETURNS_NONNULL void * llvm::safe_realloc ( void *  Ptr,
size_t  Sz 
)
inline

Definition at line 52 of file MemAlloc.h.

References report_bad_alloc_error(), and safe_malloc().

◆ salvageDebugInfo()

bool llvm::salvageDebugInfo ( Instruction I)

Assuming the instruction I is going to be deleted, attempt to salvage debug users of I by writing the effect of I in a DIExpression.

Returns true if any debug users were updated.

Definition at line 1624 of file Local.cpp.

References findDbgUsers(), I, and salvageDebugInfoForDbgValues().

Referenced by AddReachableCodeToWorklist(), bitTrackingDCE(), DCEInstruction(), deleteDeadInstruction(), llvm::InstCombiner::eraseInstFromFunction(), RecursivelyDeleteTriviallyDeadInstructions(), rewriteDebugUsers(), simplifyAndDCEInstruction(), and sinkRegion().

◆ salvageDebugInfoForDbgValues()

bool llvm::salvageDebugInfoForDbgValues ( Instruction I,
ArrayRef< DbgVariableIntrinsic * >  Insns 
)

Implementation of salvageDebugInfo, applying only to instructions in Insns, rather than all debug users of I.

Definition at line 1633 of file Local.cpp.

References dbgs(), llvm::MetadataAsValue::get(), I, LLVM_DEBUG, salvageDebugInfoImpl(), and wrapValueInMetadata().

Referenced by salvageDebugInfo(), and TryToSinkInstruction().

◆ salvageDebugInfoImpl()

DIExpression * llvm::salvageDebugInfoImpl ( Instruction I,
DIExpression DIExpr,
bool  StackVal 
)

Given an instruction I and DIExpression DIExpr operating on it, write the effects of I into the returned DIExpression, or return nullptr if it cannot be salvaged.

StackVal: whether DW_OP_stack_value should be appended to the expression.

Definition at line 1660 of file Local.cpp.

References llvm::DIExpression::appendOffset(), I, and llvm::DIExpression::prependOpcodes().

Referenced by salvageDebugInfoForDbgValues().

◆ SaturatingAdd()

template<typename T >
std::enable_if< std::is_unsigned< T >::value, T >::type llvm::SaturatingAdd ( X,
Y,
bool ResultOverflowed = nullptr 
)

Add two unsigned integers, X and Y, of type T.

Clamp the result to the maximum representable value of T on overflow. ResultOverflowed indicates if the result is larger than the maximum representable value of type T.

Definition at line 780 of file MathExtras.h.

References X(), and Y().

Referenced by computeSyntheticCounts(), llvm::CGProfilePass::run(), SaturatingMultiply(), and SaturatingMultiplyAdd().

◆ SaturatingMultiply()

template<typename T >
std::enable_if< std::is_unsigned< T >::value, T >::type llvm::SaturatingMultiply ( X,
Y,
bool ResultOverflowed = nullptr 
)

Multiply two unsigned integers, X and Y, of type T.

Clamp the result to the maximum representable value of T on overflow. ResultOverflowed indicates if the result is larger than the maximum representable value of type T.

Definition at line 797 of file MathExtras.h.

References Log2_64(), SaturatingAdd(), X(), and Y().

Referenced by SaturatingMultiplyAdd().

◆ SaturatingMultiplyAdd()

template<typename T >
std::enable_if< std::is_unsigned< T >::value, T >::type llvm::SaturatingMultiplyAdd ( X,
Y,
A,
bool ResultOverflowed = nullptr 
)

Multiply two unsigned integers, X and Y, and add the unsigned integer, A to the product.

Clamp the result to the maximum representable value of T on overflow. ResultOverflowed indicates if the result is larger than the maximum representable value of type T.

Definition at line 843 of file MathExtras.h.

References SaturatingAdd(), SaturatingMultiply(), X(), and Y().

◆ SavePrettyStackState()

const void * llvm::SavePrettyStackState ( )

Returns the topmost element of the "pretty" stack state.

Definition at line 251 of file PrettyStackTrace.cpp.

References PrettyStackTraceHead.

◆ scaleBranchCount()

static uint32_t llvm::scaleBranchCount ( uint64_t  Count,
uint64_t  Scale 
)
inlinestatic

Scale an individual branch count.

Scale a 64-bit weight down to 32-bits using Scale.

Definition at line 202 of file Instrumentation.h.

References assert().

Referenced by llvm::pgo::promoteIndirectCall(), and setProfMetadata().

◆ SCEVExprContains()

template<typename PredTy >
bool llvm::SCEVExprContains ( const SCEV Root,
PredTy  Pred 
)

Return true if any node in Root satisfies the predicate Pred.

Definition at line 622 of file ScalarEvolutionExpressions.h.

References visitAll().

Referenced by llvm::ScalarEvolution::containsAddRecurrence(), containsParameters(), containsUndefs(), and llvm::ScalarEvolution::hasOperand().

◆ ScopedPrinter::printHex< support::ulittle16_t >()

template<>
void llvm::ScopedPrinter::printHex< support::ulittle16_t > ( StringRef  Label,
support::ulittle16_t  Value 
)
inline

Definition at line 354 of file ScopedPrinter.h.

◆ SearchForAddressOfSpecialSymbol()

void * llvm::SearchForAddressOfSpecialSymbol ( const char SymbolName)

◆ set_thread_name()

void llvm::set_thread_name ( const Twine &  Name)

Set the name of the current thread.

Setting a thread's name can be helpful for enabling useful diagnostics under a debugger or when logging. The level of support for setting a thread's name varies wildly across operating systems, and we only make a best effort to perform the operation on supported platforms. No indication of success or failure is returned.

◆ set_thread_priority()

SetThreadPriorityResult llvm::set_thread_priority ( ThreadPriority  Priority)

◆ setCurrentDebugType()

void llvm::setCurrentDebugType ( const char Type)

setCurrentDebugType - Set the current debug type, as if the -debug-only=X option were specified.

Note that DebugFlag also needs to be set to true for debug output to be produced.

Definition at line 68 of file Debug.cpp.

References setCurrentDebugTypes().

◆ setCurrentDebugTypes()

void llvm::setCurrentDebugTypes ( const char **  Types,
unsigned  Count 
)

setCurrentDebugTypes - Set the current debug type, as if the -debug-only=X,Y,Z option were specified.

Set the current debug type, as if the -debug-only=X option were specified.

Note that DebugFlag also needs to be set to true for debug output to be produced.

Definition at line 72 of file Debug.cpp.

References CurrentDebugType.

Referenced by setCurrentDebugType().

◆ setIrrLoopHeaderMetadata()

void llvm::setIrrLoopHeaderMetadata ( Module M,
Instruction TI,
uint64_t  Count 
)

◆ setMod()

LLVM_NODISCARD ModRefInfo llvm::setMod ( const ModRefInfo  MRI)
inline

Definition at line 160 of file AliasAnalysis.h.

References MustMod.

Referenced by llvm::BasicAAResult::getModRefInfo().

◆ setModAndRef()

LLVM_NODISCARD ModRefInfo llvm::setModAndRef ( const ModRefInfo  MRI)
inline

Definition at line 172 of file AliasAnalysis.h.

References MustModRef.

◆ setMust()

LLVM_NODISCARD ModRefInfo llvm::setMust ( const ModRefInfo  MRI)
inline

◆ setProfMetadata()

void llvm::setProfMetadata ( Module M,
Instruction TI,
ArrayRef< uint64_t >  EdgeCounts,
uint64_t  MaxCount 
)

◆ setRef()

LLVM_NODISCARD ModRefInfo llvm::setRef ( const ModRefInfo  MRI)
inline

Definition at line 164 of file AliasAnalysis.h.

References MustRef.

Referenced by llvm::BasicAAResult::getModRefInfo().

◆ setupOptimizationRemarks()

Expected< std::unique_ptr< ToolOutputFile > > llvm::setupOptimizationRemarks ( LLVMContext Context,
StringRef  RemarksFilename,
StringRef  RemarksPasses,
StringRef  RemarksFormat,
bool  RemarksWithHotness,
unsigned  RemarksHotnessThreshold = 0 
)

◆ shiftRight()

static lostFraction llvm::shiftRight ( APFloatBase::integerPart *  dst,
unsigned int  parts,
unsigned int  bits 
)
static

Definition at line 479 of file APFloat.cpp.

References bits, and lostFractionThroughTruncation().

◆ shouldOptimizeForSize() [1/2]

bool llvm::shouldOptimizeForSize ( BasicBlock BB,
ProfileSummaryInfo PSI,
BlockFrequencyInfo BFI 
)

Returns true if basic block BB is suggested to be size-optimized base on the profile.

Definition at line 31 of file SizeOpts.cpp.

References assert(), llvm::ProfileSummaryInfo::hasProfileSummary(), llvm::ProfileSummaryInfo::isColdBlock(), and ProfileGuidedSizeOpt.

◆ shouldOptimizeForSize() [2/2]

bool llvm::shouldOptimizeForSize ( Function F,
ProfileSummaryInfo PSI,
BlockFrequencyInfo BFI 
)

Returns true if function F is suggested to be size-optimized base on the profile.

Definition at line 23 of file SizeOpts.cpp.

References assert(), F, llvm::ProfileSummaryInfo::hasProfileSummary(), llvm::ProfileSummaryInfo::isFunctionColdInCallGraph(), and ProfileGuidedSizeOpt.

Referenced by gatherUnrollingPreferences(), llvm::LoopVectorizePass::processLoop(), and processLoopInVPlanNativePath().

◆ shouldPrintAfterPass() [1/2]

bool llvm::shouldPrintAfterPass ( )

◆ shouldPrintAfterPass() [2/2]

bool llvm::shouldPrintAfterPass ( StringRef  PassID)

◆ shouldPrintBeforePass() [1/2]

bool llvm::shouldPrintBeforePass ( )

This is a helper to determine whether to print IR before or after a pass.

Definition at line 103 of file LegacyPassManager.cpp.

References PrintBefore(), and PrintBeforeAll.

Referenced by llvm::PrintIRInstrumentation::registerCallbacks(), and llvm::PMTopLevelManager::schedulePass().

◆ shouldPrintBeforePass() [2/2]

bool llvm::shouldPrintBeforePass ( StringRef  PassID)

◆ shouldReverseIterate()

template<class T = void *>
bool llvm::shouldReverseIterate ( )

Definition at line 10 of file ReverseIteration.h.

◆ SignBitMustBeZero()

bool llvm::SignBitMustBeZero ( const Value V,
const TargetLibraryInfo TLI 
)

Return true if we can prove that the specified FP value's sign bit is 0.

 NaN --> true/false (depending on the NaN's sign bit)
  +0 --> true
  -0 --> false

x > +0 --> true x < -0 --> false

Definition at line 3085 of file ValueTracking.cpp.

References cannotBeOrderedLessThanZeroImpl().

Referenced by simplifyUnaryIntrinsic().

◆ SignExtend32() [1/2]

template<unsigned B>
constexpr int32_t llvm::SignExtend32 ( uint32_t  X)
inlineconstexpr

Sign-extend the number in the bottom B bits of X to a 32-bit integer.

Requires 0 < B <= 32.

Definition at line 737 of file MathExtras.h.

References X().

◆ SignExtend32() [2/2]

int32_t llvm::SignExtend32 ( uint32_t  X,
unsigned  B 
)
inline

Sign-extend the number in the bottom B bits of X to a 32-bit integer.

Requires 0 < B < 32.

Definition at line 745 of file MathExtras.h.

References assert(), and X().

◆ SignExtend64() [1/2]

template<unsigned B>
constexpr int64_t llvm::SignExtend64 ( uint64_t  x)
inlineconstexpr

Sign-extend the number in the bottom B bits of X to a 64-bit integer.

Requires 0 < B < 64.

Definition at line 753 of file MathExtras.h.

Referenced by evaluateGEPOffsetExpression().

◆ SignExtend64() [2/2]

int64_t llvm::SignExtend64 ( uint64_t  X,
unsigned  B 
)
inline

Sign-extend the number in the bottom B bits of X to a 64-bit integer.

Requires 0 < B < 64.

Definition at line 761 of file MathExtras.h.

References assert(), and X().

◆ SimplifyAddInst()

Value * llvm::SimplifyAddInst ( Value LHS,
Value RHS,
bool  isNSW,
bool  isNUW,
const SimplifyQuery Q 
)

Given operands for an Add, fold the result or return null.

Definition at line 640 of file InstructionSimplify.cpp.

References RecursionLimit.

Referenced by llvm::InstCombiner::visitAdd(), and llvm::InstCombiner::visitGetElementPtrInst().

◆ SimplifyAndInst()

Value * llvm::SimplifyAndInst ( Value LHS,
Value RHS,
const SimplifyQuery Q 
)

Given operands for an And, fold the result or return null.

Definition at line 1906 of file InstructionSimplify.cpp.

References RecursionLimit.

Referenced by llvm::InstCombiner::visitAnd().

◆ SimplifyAShrInst()

Value * llvm::SimplifyAShrInst ( Value Op0,
Value Op1,
bool  isExact,
const SimplifyQuery Q 
)

Given operands for a AShr, fold the result or return nulll.

Definition at line 1366 of file InstructionSimplify.cpp.

References RecursionLimit.

Referenced by llvm::InstCombiner::visitAShr().

◆ SimplifyBinOp()

Value * llvm::SimplifyBinOp ( unsigned  Opcode,
Value LHS,
Value RHS,
const SimplifyQuery Q 
)

Given operands for a BinaryOperator, fold the result or return null.

Definition at line 4656 of file InstructionSimplify.cpp.

References RecursionLimit.

Referenced by constantFoldUser(), foldShiftIntoShiftInAnotherHandOfAndInICmp(), and reassociateShiftAmtsOfTwoSameDirectionShifts().

◆ SimplifyCall()

Value * llvm::SimplifyCall ( CallBase Call,
const SimplifyQuery Q 
)

Given a callsite, fold the result or return null.

Definition at line 5017 of file InstructionSimplify.cpp.

References canConstantFoldCallTo(), ConstantFoldCall(), F, llvm::UndefValue::get(), simplifyIntrinsic(), and llvm::SimplifyQuery::TLI.

Referenced by SimplifyInstruction(), and llvm::InstCombiner::visitCallInst().

◆ SimplifyCastInst()

Value * llvm::SimplifyCastInst ( unsigned  CastOpc,
Value Op,
Type Ty,
const SimplifyQuery Q 
)

Given operands for a CastInst, fold the result or return null.

Definition at line 4152 of file InstructionSimplify.cpp.

References RecursionLimit.

Referenced by constantFoldUser().

◆ simplifyCFG()

bool llvm::simplifyCFG ( BasicBlock BB,
const TargetTransformInfo TTI,
const SimplifyCFGOptions Options = {},
SmallPtrSetImpl< BasicBlock * > *  LoopHeaders = nullptr 
)

This function is used to do simplification of a CFG.

For example, it adjusts branches to branches to eliminate the extra hop, it eliminates unreachable basic blocks, and does other peephole optimization of the CFG. It returns true if a modification was made, possibly deleting the basic block that was pointed to. LoopHeaders is an optional input parameter providing the set of loop headers that SimplifyCFG should not eliminate.

Definition at line 6076 of file SimplifyCFG.cpp.

References llvm::Module::getDataLayout(), and llvm::BasicBlock::getModule().

Referenced by iterativelySimplifyCFG().

◆ SimplifyCmpInst()

Value * llvm::SimplifyCmpInst ( unsigned  Predicate,
Value LHS,
Value RHS,
const SimplifyQuery Q 
)

Given operands for a CmpInst, fold the result or return null.

Definition at line 4674 of file InstructionSimplify.cpp.

References RecursionLimit.

Referenced by CanProveNotTakenFirstIteration(), and llvm::JumpThreadingPass::ComputeValueKnownInPredecessorsImpl().

◆ SimplifyExtractElementInst()

Value * llvm::SimplifyExtractElementInst ( Value Vec,
Value Idx,
const SimplifyQuery Q 
)

Given operands for an ExtractElementInst, fold the result or return null.

Definition at line 4080 of file InstructionSimplify.cpp.

References Idx, and RecursionLimit.

Referenced by llvm::InstCombiner::visitExtractElementInst().

◆ SimplifyExtractValueInst()

Value * llvm::SimplifyExtractValueInst ( Value Agg,
ArrayRef< unsigned Idxs,
const SimplifyQuery Q 
)

Given operands for an ExtractValueInst, fold the result or return null.

Definition at line 4041 of file InstructionSimplify.cpp.

References RecursionLimit.

Referenced by llvm::InstCombiner::visitExtractValueInst().

◆ SimplifyFAddInst()

Value * llvm::SimplifyFAddInst ( Value LHS,
Value RHS,
FastMathFlags  FMF,
const SimplifyQuery Q 
)

Given operands for an FAdd, fold the result or return null.

Definition at line 4462 of file InstructionSimplify.cpp.

References RecursionLimit.

Referenced by llvm::InstCombiner::visitFAdd().

◆ SimplifyFCmpInst()

Value * llvm::SimplifyFCmpInst ( unsigned  Predicate,
Value LHS,
Value RHS,
FastMathFlags  FMF,
const SimplifyQuery Q 
)

Given operands for an FCmpInst, fold the result or return null.

Definition at line 3503 of file InstructionSimplify.cpp.

References RecursionLimit.

Referenced by llvm::InstCombiner::visitFCmpInst().

◆ SimplifyFDivInst()

Value * llvm::SimplifyFDivInst ( Value LHS,
Value RHS,
FastMathFlags  FMF,
const SimplifyQuery Q 
)

Given operands for an FDiv, fold the result or return null.

Definition at line 4518 of file InstructionSimplify.cpp.

References RecursionLimit.

Referenced by llvm::InstCombiner::visitFDiv().

◆ SimplifyFMulInst()

Value * llvm::SimplifyFMulInst ( Value LHS,
Value RHS,
FastMathFlags  FMF,
const SimplifyQuery Q 
)

Given operands for an FMul, fold the result or return null.

Definition at line 4473 of file InstructionSimplify.cpp.

References RecursionLimit.

Referenced by llvm::InstCombiner::visitFMul().

◆ SimplifyFNegInst()

Value * llvm::SimplifyFNegInst ( Value Op,
FastMathFlags  FMF,
const SimplifyQuery Q 
)

Given operand for an FNeg, fold the result or return null.

Definition at line 4312 of file InstructionSimplify.cpp.

References RecursionLimit.

Referenced by SimplifyInstruction(), and llvm::InstCombiner::visitFNeg().

◆ SimplifyFPBinOp()

Value * llvm::SimplifyFPBinOp ( unsigned  Opcode,
Value LHS,
Value RHS,
FastMathFlags  FMF,
const SimplifyQuery Q 
)

Given operands for an FP BinaryOperator, fold the result or return null.

In contrast to SimplifyBinOp, try to use FastMathFlag when folding the result. In case we don't need FastMathFlags, simply fall to SimplifyBinOp.

Definition at line 4661 of file InstructionSimplify.cpp.

References RecursionLimit.

◆ SimplifyFPUnOp()

Value * llvm::SimplifyFPUnOp ( unsigned  Opcode,
Value Op,
FastMathFlags  FMF,
const SimplifyQuery Q 
)

Given operand for an FP UnaryOperator, fold the result or return null.

In contrast to SimplifyUnOp, try to use FastMathFlag when folding the result. In case we don't need FastMathFlags, simply fall to SimplifyUnOp.

Definition at line 4584 of file InstructionSimplify.cpp.

References RecursionLimit.

◆ SimplifyFRemInst()

Value * llvm::SimplifyFRemInst ( Value LHS,
Value RHS,
FastMathFlags  FMF,
const SimplifyQuery Q 
)

Given operands for an FRem, fold the result or return null.

Definition at line 4546 of file InstructionSimplify.cpp.

References RecursionLimit.

Referenced by llvm::InstCombiner::visitFRem().

◆ SimplifyFSubInst()

Value * llvm::SimplifyFSubInst ( Value LHS,
Value RHS,
FastMathFlags  FMF,
const SimplifyQuery Q 
)

Given operands for an FSub, fold the result or return null.

Definition at line 4468 of file InstructionSimplify.cpp.

References RecursionLimit.

Referenced by llvm::InstCombiner::visitFSub().

◆ SimplifyGEPInst()

Value * llvm::SimplifyGEPInst ( Type SrcTy,
ArrayRef< Value * >  Ops,
const SimplifyQuery Q 
)

Given operands for a GetElementPtrInst, fold the result or return null.

Definition at line 3942 of file InstructionSimplify.cpp.

References RecursionLimit.

Referenced by llvm::InstCombiner::visitGetElementPtrInst().

◆ SimplifyICmpInst()

Value * llvm::SimplifyICmpInst ( unsigned  Predicate,
Value LHS,
Value RHS,
const SimplifyQuery Q 
)

Given operands for an ICmpInst, fold the result or return null.

Definition at line 3314 of file InstructionSimplify.cpp.

References RecursionLimit.

Referenced by llvm::InstCombiner::visitICmpInst().

◆ SimplifyInsertElementInst()

Value * llvm::SimplifyInsertElementInst ( Value Vec,
Value Elt,
Value Idx,
const SimplifyQuery Q 
)

◆ SimplifyInsertValueInst()

Value * llvm::SimplifyInsertValueInst ( Value Agg,
Value Val,
ArrayRef< unsigned Idxs,
const SimplifyQuery Q 
)

Given operands for an InsertValueInst, fold the result or return null.

Definition at line 3976 of file InstructionSimplify.cpp.

References RecursionLimit.

◆ SimplifyInstruction()

Value * llvm::SimplifyInstruction ( Instruction I,
const SimplifyQuery SQ,
OptimizationRemarkEmitter ORE = nullptr 
)

See if we can compute a simplified version of this instruction.

If not, return null.

If not, this returns null.

If called on unreachable code, the above logic may report that the instruction simplified to itself. Make life easier for users by detecting that case here, returning a safe value instead.

Definition at line 5052 of file InstructionSimplify.cpp.

References llvm::SimplifyQuery::AC, computeKnownBits(), ConstantFoldInstruction(), llvm::SimplifyQuery::CxtI, llvm::SimplifyQuery::DL, llvm::SimplifyQuery::DT, llvm::UndefValue::get(), llvm::ConstantInt::get(), llvm::InsertValueInst::getAggregateOperand(), llvm::KnownBits::getConstant(), llvm::InsertValueInst::getIndices(), llvm::InsertValueInst::getInsertedValueOperand(), llvm::SimplifyQuery::getWithInstruction(), llvm::InstrInfoQuery::hasNoSignedWrap(), llvm::InstrInfoQuery::hasNoUnsignedWrap(), I, llvm::SimplifyQuery::IIQ, llvm::KnownBits::isConstant(), llvm::InstrInfoQuery::isExact(), SimplifyAddInst(), SimplifyAndInst(), SimplifyAShrInst(), SimplifyCall(), SimplifyCastInst(), SimplifyExtractElementInst(), SimplifyExtractValueInst(), SimplifyFAddInst(), SimplifyFCmpInst(), SimplifyFDivInst(), SimplifyFMulInst(), SimplifyFNegInst(), SimplifyFRemInst(), SimplifyFSubInst(), SimplifyGEPInst(), SimplifyICmpInst(), SimplifyInsertElementInst(), SimplifyInsertValueInst(), SimplifyLShrInst(), SimplifyMulInst(), SimplifyOrInst(), SimplifyPHINode(), SimplifySDivInst(), SimplifySelectInst(), SimplifyShlInst(), SimplifyShuffleVectorInst(), SimplifySRemInst(), SimplifySubInst(), SimplifyUDivInst(), SimplifyURemInst(), SimplifyXorInst(), and llvm::SimplifyQuery::TLI.

Referenced by CloneAndPruneIntoFromInst(), llvm::JumpThreadingPass::DuplicateCondBranchOnPHIIntoPred(), eliminateTailRecursion(), findPHIToPartitionLoops(), FoldCondBranchOnPHI(), FoldTwoEntryPHINode(), GetUnderlyingObject(), llvm::SSAUpdater::GetValueInMiddleOfBlock(), InlineFunction(), processPHI(), replaceAndRecursivelySimplifyImpl(), llvm::SCEVExpander::replaceCongruentIVs(), runImpl(), simplifyAndDCEInstruction(), simplifyLoopAfterUnroll(), simplifyLoopInst(), simplifyOneLoop(), and llvm::InstCombiner::visitPHINode().

◆ SimplifyInstructionsInBlock()

bool llvm::SimplifyInstructionsInBlock ( BasicBlock BB,
const TargetLibraryInfo TLI = nullptr 
)

Scan the specified basic block and try to simplify any instructions in it and recursively delete dead instructions.

SimplifyInstructionsInBlock - Scan the specified basic block and try to simplify any instructions in it and recursively delete dead instructions.

This returns true if it changed the code, note that it can delete instructions in other blocks as well in this block.

Definition at line 596 of file Local.cpp.

References assert(), llvm::BasicBlock::back(), llvm::BasicBlock::begin(), llvm::BasicBlock::end(), llvm::Module::getDataLayout(), llvm::BasicBlock::getModule(), I, and simplifyAndDCEInstruction().

Referenced by foldUnusualPatterns(), and llvm::JumpThreadingPass::ThreadEdge().

◆ simplifyLoop()

bool llvm::simplifyLoop ( Loop L,
DominatorTree DT,
LoopInfo LI,
ScalarEvolution SE,
AssumptionCache AC,
MemorySSAUpdater MSSAU,
bool  PreserveLCSSA 
)

Simplify each loop in a loop nest recursively.

This takes a potentially un-simplified loop L (and its children) and turns it into a simplified loop nest with preheaders and single backedges. It will update DominatorTree, LoopInfo, ScalarEvolution and MemorySSA analyses if they're non-null, and LCSSA if PreserveLCSSA is true.

Definition at line 709 of file LoopSimplify.cpp.

References assert(), llvm::LoopBase< BlockT, LoopT >::begin(), llvm::LoopBase< BlockT, LoopT >::end(), Idx, llvm::Loop::isRecursivelyLCSSAForm(), and simplifyOneLoop().

Referenced by peelLoop(), llvm::LoopUnrollPass::run(), llvm::LoopSimplifyPass::run(), llvm::LoopVectorizePass::runImpl(), and UnrollLoop().

◆ simplifyLoopAfterUnroll()

void llvm::simplifyLoopAfterUnroll ( Loop L,
bool  SimplifyIVs,
LoopInfo LI,
ScalarEvolution SE,
DominatorTree DT,
AssumptionCache AC 
)

Perform some cleanup and simplifications on loops after unrolling.

It is useful to simplify the IV's in the new loop, as well as do a quick simplify/dce pass of the instructions.

Definition at line 199 of file LoopUnroll.cpp.

References llvm::LoopBase< BlockT, LoopT >::getBlocks(), llvm::Module::getDataLayout(), llvm::LoopBase< BlockT, LoopT >::getHeader(), llvm::BasicBlock::getModule(), I, isInstructionTriviallyDead(), RecursivelyDeleteTriviallyDeadInstructions(), llvm::Value::replaceAllUsesWith(), llvm::LoopInfo::replacementPreservesLCSSAForm(), SimplifyInstruction(), and simplifyLoopIVs().

Referenced by UnrollAndJamLoop(), and UnrollLoop().

◆ simplifyLoopIVs()

bool llvm::simplifyLoopIVs ( Loop L,
ScalarEvolution SE,
DominatorTree DT,
LoopInfo LI,
SmallVectorImpl< WeakTrackingVH > &  Dead 
)

SimplifyLoopIVs - Simplify users of induction variables within this loop.

Simplify users of induction variables within this loop.

This does not actually change or add IVs.

Definition at line 944 of file SimplifyIndVar.cpp.

References llvm::BasicBlock::begin(), DEBUG_TYPE, llvm::ScalarEvolution::getDataLayout(), llvm::LoopBase< BlockT, LoopT >::getHeader(), I, llvm::SCEVExpander::setDebugType(), and simplifyUsersOfIV().

Referenced by simplifyLoopAfterUnroll().

◆ SimplifyLShrInst()

Value * llvm::SimplifyLShrInst ( Value Op0,
Value Op1,
bool  isExact,
const SimplifyQuery Q 
)

Given operands for a LShr, fold the result or return null.

Definition at line 1335 of file InstructionSimplify.cpp.

References RecursionLimit.

Referenced by llvm::InstCombiner::visitLShr().

◆ SimplifyMulInst()

Value * llvm::SimplifyMulInst ( Value LHS,
Value RHS,
const SimplifyQuery Q 
)

Given operands for a Mul, fold the result or return null.

Definition at line 885 of file InstructionSimplify.cpp.

References RecursionLimit.

Referenced by llvm::InstCombiner::visitMul().

◆ SimplifyOrInst()

Value * llvm::SimplifyOrInst ( Value LHS,
Value RHS,
const SimplifyQuery Q 
)

Given operands for an Or, fold the result or return null.

Definition at line 2042 of file InstructionSimplify.cpp.

References RecursionLimit.

Referenced by llvm::InstCombiner::visitOr().

◆ SimplifySDivInst()

Value * llvm::SimplifySDivInst ( Value LHS,
Value RHS,
const SimplifyQuery Q 
)

Given operands for an SDiv, fold the result or return null.

Definition at line 1119 of file InstructionSimplify.cpp.

References RecursionLimit.

Referenced by llvm::InstCombiner::visitSDiv().

◆ SimplifySelectInst()

Value * llvm::SimplifySelectInst ( Value Cond,
Value TrueVal,
Value FalseVal,
const SimplifyQuery Q 
)

Given operands for a SelectInst, fold the result or return null.

Definition at line 3823 of file InstructionSimplify.cpp.

References RecursionLimit.

◆ SimplifyShlInst()

Value * llvm::SimplifyShlInst ( Value Op0,
Value Op1,
bool  isNSW,
bool  isNUW,
const SimplifyQuery Q 
)

Given operands for a Shl, fold the result or return null.

Definition at line 1297 of file InstructionSimplify.cpp.

References RecursionLimit.

Referenced by llvm::InstCombiner::visitShl().

◆ SimplifyShuffleVectorInst()

Value * llvm::SimplifyShuffleVectorInst ( Value Op0,
Value Op1,
Constant Mask,
Type RetTy,
const SimplifyQuery Q 
)

Given operands for a ShuffleVectorInst, fold the result or return null.

Definition at line 4285 of file InstructionSimplify.cpp.

References RecursionLimit, and RetTy.

Referenced by llvm::InstCombiner::visitShuffleVectorInst().

◆ SimplifySRemInst()

Value * llvm::SimplifySRemInst ( Value LHS,
Value RHS,
const SimplifyQuery Q 
)

Given operands for an SRem, fold the result or return null.

Definition at line 1151 of file InstructionSimplify.cpp.

References RecursionLimit.

Referenced by llvm::InstCombiner::visitSRem().

◆ SimplifySubInst()

Value * llvm::SimplifySubInst ( Value LHS,
Value RHS,
bool  isNSW,
bool  isNUW,
const SimplifyQuery Q 
)

Given operands for a Sub, fold the result or return null.

Definition at line 824 of file InstructionSimplify.cpp.

References RecursionLimit.

Referenced by llvm::InstCombiner::visitSub().

◆ SimplifyUDivInst()

Value * llvm::SimplifyUDivInst ( Value LHS,
Value RHS,
const SimplifyQuery Q 
)

Given operands for a UDiv, fold the result or return null.

Definition at line 1130 of file InstructionSimplify.cpp.

References RecursionLimit.

Referenced by llvm::InstCombiner::visitUDiv().

◆ SimplifyUnOp()

Value * llvm::SimplifyUnOp ( unsigned  Opcode,
Value Op,
const SimplifyQuery Q 
)

Given operand for a UnaryOperator, fold the result or return null.

Definition at line 4580 of file InstructionSimplify.cpp.

References RecursionLimit.

◆ SimplifyURemInst()

Value * llvm::SimplifyURemInst ( Value LHS,
Value RHS,
const SimplifyQuery Q 
)

Given operands for a URem, fold the result or return null.

Definition at line 1162 of file InstructionSimplify.cpp.

References RecursionLimit.

Referenced by llvm::InstCombiner::visitURem().

◆ simplifyUsersOfIV()

bool llvm::simplifyUsersOfIV ( PHINode CurrIV,
ScalarEvolution SE,
DominatorTree DT,
LoopInfo LI,
SmallVectorImpl< WeakTrackingVH > &  Dead,
SCEVExpander Rewriter,
IVVisitor V = nullptr 
)

simplifyUsersOfIV - Simplify instructions that use this induction variable by using ScalarEvolution to analyze the IV's recurrence.

Simplify instructions that use this induction variable by using ScalarEvolution to analyze the IV's recurrence.

Definition at line 933 of file SimplifyIndVar.cpp.

References llvm::LoopInfoBase< BlockT, LoopT >::getLoopFor(), and llvm::Instruction::getParent().

Referenced by simplifyLoopIVs().

◆ SimplifyXorInst()

Value * llvm::SimplifyXorInst ( Value LHS,
Value RHS,
const SimplifyQuery Q 
)

Given operands for an Xor, fold the result or return null.

Definition at line 2087 of file InstructionSimplify.cpp.

References RecursionLimit.

Referenced by llvm::InstCombiner::visitXor().

◆ sinkRegion()

bool llvm::sinkRegion ( DomTreeNode N,
AliasAnalysis AA,
LoopInfo LI,
DominatorTree DT,
TargetLibraryInfo TLI,
TargetTransformInfo TTI,
Loop CurLoop,
AliasSetTracker CurAST,
MemorySSAUpdater MSSAU,
ICFLoopSafetyInfo SafetyInfo,
SinkAndHoistLICMFlags Flags,
OptimizationRemarkEmitter ORE 
)

Walk the specified region of the CFG (defined by all blocks dominated by the specified block, and that are in the current loop) in reverse depth first order w.r.t the DominatorTree.

This allows us to visit uses before definitions, allowing us to sink a loop body in one pass without iteration. Takes DomTreeNode, AliasAnalysis, LoopInfo, DominatorTree, DataLayout, TargetLibraryInfo, Loop, AliasSet information for all instructions of the loop and loop safety information as arguments. Diagnostics is emitted via ORE. It returns changed status.

This allows us to visit uses before definitions, allowing us to sink a loop body in one pass without iteration.

Definition at line 487 of file LICM.cpp.

References assert(), llvm::BasicBlock::begin(), canSinkOrHoistInst(), collectChildrenInLoop(), dbgs(), llvm::BasicBlock::end(), eraseInstruction(), llvm::MemorySSAUpdater::getMemorySSA(), I, inSubLoop(), isInstructionTriviallyDead(), isNotUsedOrFreeInLoop(), LLVM_DEBUG, N, salvageDebugInfo(), sink, llvm::MemorySSA::verifyMemorySSA(), and VerifyMemorySSA.

◆ skipDebugIntrinsics()

BasicBlock::iterator llvm::skipDebugIntrinsics ( BasicBlock::iterator  It)

Advance It while it points to a debug instruction and return the result.

This assumes that It is not at the end of a block.

Definition at line 485 of file BasicBlock.cpp.

◆ skipLeadingZeroesAndAnyDot()

static StringRef::iterator llvm::skipLeadingZeroesAndAnyDot ( StringRef::iterator  begin,
StringRef::iterator  end,
StringRef::iterator *  dot 
)
static

Definition at line 326 of file APFloat.cpp.

References assert(), and dot.

Referenced by interpretDecimal().

◆ sortPtrAccesses()

bool llvm::sortPtrAccesses ( ArrayRef< Value * >  VL,
const DataLayout DL,
ScalarEvolution SE,
SmallVectorImpl< unsigned > &  SortedIndices 
)

Attempt to sort the pointers in VL and return the sorted indices in SortedIndices, if reordering is required.

Returns 'true' if sorting is legal, otherwise returns 'false'.

For example, for a given VL of memory accesses in program order, a[i+4], a[i+0], a[i+1] and a[i+7], this function will sort the VL and save the sorted indices in SortedIndices as a[i+0], a[i+1], a[i+4], a[i+7] and saves the mask for actual memory accesses in program order in SortedIndices as <1,2,0,3>

Definition at line 1100 of file LoopAccessAnalysis.cpp.

References assert(), llvm::ScalarEvolution::getMinusSCEV(), llvm::Type::getPointerAddressSpace(), llvm::ScalarEvolution::getSCEV(), llvm::Value::getType(), GetUnderlyingObject(), I, Left, and Right.

◆ SplitAllCriticalEdges()

unsigned llvm::SplitAllCriticalEdges ( Function F,
const CriticalEdgeSplittingOptions Options = CriticalEdgeSplittingOptions() 
)

Loop over all of the edges in the CFG, breaking critical edges as they are found.

Returns the number of broken edges.

Definition at line 353 of file BasicBlockUtils.cpp.

References F, llvm::Instruction::getNumSuccessors(), and SplitCriticalEdge().

Referenced by llvm::BreakCriticalEdgesPass::run().

◆ SplitBlock()

BasicBlock * llvm::SplitBlock ( BasicBlock Old,
Instruction SplitPt,
DominatorTree DT = nullptr,
LoopInfo LI = nullptr,
MemorySSAUpdater MSSAU = nullptr 
)

◆ SplitBlockAndInsertIfThen()

Instruction * llvm::SplitBlockAndInsertIfThen ( Value Cond,
Instruction SplitBefore,
bool  Unreachable,
MDNode BranchWeights = nullptr,
DominatorTree DT = nullptr,
LoopInfo LI = nullptr,
BasicBlock ThenBlock = nullptr 
)

Split the containing block at the specified instruction - everything before SplitBefore stays in the old basic block, and the rest of the instructions in the BB are moved to a new block.

The two blocks are connected by a conditional branch (with value of Cmp being the condition). Before: Head SplitBefore Tail After: Head if (Cond) ThenBlock SplitBefore Tail

If ThenBlock is not specified, a new block will be created for it. If Unreachable is true, the newly created block will end with UnreachableInst, otherwise it branches to Tail. Returns the NewBasicBlock's terminator.

Updates DT and LI if given.

Definition at line 772 of file BasicBlockUtils.cpp.

References llvm::DominatorTreeBase< NodeT, IsPostDom >::addNewBlock(), llvm::DominatorTreeBase< NodeT, IsPostDom >::changeImmediateDominator(), llvm::BranchInst::Create(), llvm::BasicBlock::Create(), llvm::BasicBlock::getContext(), llvm::Instruction::getDebugLoc(), llvm::LoopInfoBase< BlockT, LoopT >::getLoopFor(), llvm::DominatorTreeBase< NodeT, IsPostDom >::getNode(), llvm::BasicBlock::getParent(), llvm::Instruction::getParent(), llvm::BasicBlock::getTerminator(), llvm::LLVMContext::MD_prof, ReplaceInstWithInst(), llvm::Instruction::setDebugLoc(), llvm::Instruction::setMetadata(), and llvm::BasicBlock::splitBasicBlock().

Referenced by instrumentMaskedLoadOrStore(), makeGuardControlFlowExplicit(), mergeConditionalStoreToAddress(), llvm::JumpThreadingPass::TryToUnfoldSelectInCurrBB(), and turnGuardIntoBranch().

◆ SplitBlockAndInsertIfThenElse()

void llvm::SplitBlockAndInsertIfThenElse ( Value Cond,
Instruction SplitBefore,
Instruction **  ThenTerm,
Instruction **  ElseTerm,
MDNode BranchWeights = nullptr 
)

SplitBlockAndInsertIfThenElse is similar to SplitBlockAndInsertIfThen, but also creates the ElseBlock.

Before: Head SplitBefore Tail After: Head if (Cond) ThenBlock else ElseBlock SplitBefore Tail

Definition at line 824 of file BasicBlockUtils.cpp.

References llvm::BranchInst::Create(), llvm::BasicBlock::Create(), llvm::BasicBlock::getContext(), llvm::Instruction::getDebugLoc(), llvm::BasicBlock::getParent(), llvm::Instruction::getParent(), llvm::BasicBlock::getTerminator(), llvm::LLVMContext::MD_prof, ReplaceInstWithInst(), llvm::Instruction::setMetadata(), and llvm::BasicBlock::splitBasicBlock().

Referenced by createMemMoveLoop(), and versionCallSite().

◆ SplitBlockPredecessors()

BasicBlock * llvm::SplitBlockPredecessors ( BasicBlock BB,
ArrayRef< BasicBlock * >  Preds,
const char Suffix,
DominatorTree DT = nullptr,
LoopInfo LI = nullptr,
MemorySSAUpdater MSSAU = nullptr,
bool  PreserveLCSSA = false 
)

This method introduces at least one new basic block into the function and moves some of the predecessors of BB to be predecessors of the new block.

The new predecessors are indicated by the Preds array. The new block is given a suffix of 'Suffix'. Returns new basic block to which predecessors from Preds are now pointing.

If BB is a landingpad block then additional basicblock might be introduced. It will have Suffix+".split_lp". See SplitLandingPadPredecessors for more details on this case.

This currently updates the LLVM IR, DominatorTree, LoopInfo, and LCCSA but no other analyses. In particular, it does not preserve LoopSimplify (because it's complicated to handle the case where one of the edges being split is an exit of a loop with other exits).

Definition at line 556 of file BasicBlockUtils.cpp.

References assert(), llvm::BasicBlock::begin(), llvm::BasicBlock::canSplitPredecessors(), llvm::BranchInst::Create(), llvm::BasicBlock::Create(), llvm::UndefValue::get(), llvm::BasicBlock::getContext(), llvm::Instruction::getDebugLoc(), llvm::BasicBlock::getFirstNonPHIOrDbg(), llvm::LoopInfoBase< BlockT, LoopT >::getLoopFor(), llvm::Value::getName(), llvm::BasicBlock::getParent(), llvm::Loop::getStartLoc(), I, llvm::BasicBlock::isLandingPad(), llvm::LoopInfoBase< BlockT, LoopT >::isLoopHeader(), llvm::Instruction::setDebugLoc(), SplitLandingPadPredecessors(), UpdateAnalysisInformation(), and UpdatePHINodes().

Referenced by ConnectEpilog(), ConnectProlog(), eliminateDeadSwitchCases(), formDedicatedExitBlocks(), InsertPreheaderForLoop(), mergeConditionalStoreToAddress(), normalizeForInvokeSafepoint(), separateNestedLoop(), SinkCommonCodeFromPredecessors(), SplitCriticalEdge(), splitPredecessorsOfLoopExit(), and UnrollRuntimeLoopRemainder().

◆ SplitCriticalEdge() [1/4]

BasicBlock * llvm::SplitCriticalEdge ( BasicBlock BB,
succ_iterator  SI,
const CriticalEdgeSplittingOptions Options = CriticalEdgeSplittingOptions() 
)
inline

◆ SplitCriticalEdge() [2/4]

BasicBlock * llvm::SplitCriticalEdge ( BasicBlock Src,
BasicBlock Dst,
const CriticalEdgeSplittingOptions Options = CriticalEdgeSplittingOptions() 
)
inline

If an edge from Src to Dst is critical, split the edge and return true, otherwise return false.

This method requires that there be an edge between the two blocks. It updates the analyses passed in the options struct

Definition at line 195 of file BasicBlockUtils.h.

References assert(), llvm::Instruction::getNumSuccessors(), llvm::Instruction::getSuccessor(), llvm::BasicBlock::getTerminator(), and SplitCriticalEdge().

◆ SplitCriticalEdge() [3/4]

bool llvm::SplitCriticalEdge ( BasicBlock Succ,
pred_iterator  PI,
const CriticalEdgeSplittingOptions Options = CriticalEdgeSplittingOptions() 
)
inline

If the edge from *PI to BB is not critical, return false.

Otherwise, split all edges between the two blocks and return true. This updates all of the same analyses as the other SplitCriticalEdge function. If P is specified, it updates the analyses described above.

Definition at line 180 of file BasicBlockUtils.h.

References llvm::Instruction::getNumSuccessors(), llvm::Instruction::getSuccessor(), and SplitCriticalEdge().

◆ SplitCriticalEdge() [4/4]

BasicBlock * llvm::SplitCriticalEdge ( Instruction TI,
unsigned  SuccNum,
const CriticalEdgeSplittingOptions Options = CriticalEdgeSplittingOptions() 
)

If this edge is a critical edge, insert a new node to split the critical edge.

This will update the analyses passed in through the option struct. This returns the new block if the edge was split, null otherwise.

If MergeIdenticalEdges in the options struct is true (not the default), all edges from TI to the specified successor will be merged into the same critical edge block. This is most commonly interesting with switch instructions, which may have many edges to any one destination. This ensures that all edges to that dest go to one block instead of each going to a different block, but isn't the standard definition of a "critical edge".

It is invalid to call this function on a critical edge that starts at an IndirectBrInst. Splitting these edges will almost always create an invalid program because the address of the new block won't be the one that is jumped to.

Definition at line 137 of file BreakCriticalEdges.cpp.

References assert(), llvm::BasicBlock::begin(), llvm::BranchInst::Create(), llvm::BasicBlock::Create(), createPHIsForSplitLoopExit(), llvm::DominatorTreeBase< NodeT, IsPostDom >::Delete, llvm::CriticalEdgeSplittingOptions::DT, F, llvm::PHINode::getBasicBlockIndex(), llvm::Value::getContext(), llvm::Instruction::getDebugLoc(), llvm::BasicBlock::getFirstNonPHIOrDbgOrLifetime(), llvm::PHINode::getIncomingBlock(), llvm::Value::getName(), llvm::Instruction::getNumSuccessors(), llvm::BasicBlock::getParent(), llvm::Instruction::getParent(), llvm::Instruction::getSuccessor(), I, llvm::CriticalEdgeSplittingOptions::IgnoreUnreachableDests, llvm::DominatorTreeBase< NodeT, IsPostDom >::Insert, isCriticalEdge(), llvm::BasicBlock::isEHPad(), llvm::CriticalEdgeSplittingOptions::KeepOneInputPHIs, llvm::CriticalEdgeSplittingOptions::LI, llvm::CriticalEdgeSplittingOptions::MergeIdenticalEdges, llvm::CriticalEdgeSplittingOptions::MSSAU, P, llvm::CriticalEdgeSplittingOptions::PDT, pred_begin(), pred_end(), llvm::CriticalEdgeSplittingOptions::PreserveLCSSA, llvm::BasicBlock::removePredecessor(), llvm::Instruction::setDebugLoc(), llvm::PHINode::setIncomingBlock(), llvm::Instruction::setSuccessor(), SplitBlockPredecessors(), succ_end(), successors(), and llvm::MemorySSAUpdater::wireOldPredecessorsToNewImmediatePredecessor().

Referenced by DemoteRegToStack(), speculatePHIs(), SplitAllCriticalEdges(), SplitCriticalEdge(), and SplitEdge().

◆ SplitEdge()

BasicBlock * llvm::SplitEdge ( BasicBlock From,
BasicBlock To,
DominatorTree DT = nullptr,
LoopInfo LI = nullptr,
MemorySSAUpdater MSSAU = nullptr 
)

◆ SplitIndirectBrCriticalEdges()

bool llvm::SplitIndirectBrCriticalEdges ( Function F,
BranchProbabilityInfo BPI = nullptr,
BlockFrequencyInfo BFI = nullptr 
)

◆ SplitLandingPadPredecessors()

void llvm::SplitLandingPadPredecessors ( BasicBlock OrigBB,
ArrayRef< BasicBlock * >  Preds,
const char Suffix,
const char Suffix2,
SmallVectorImpl< BasicBlock * > &  NewBBs,
DominatorTree DT = nullptr,
LoopInfo LI = nullptr,
MemorySSAUpdater MSSAU = nullptr,
bool  PreserveLCSSA = false 
)

This method transforms the landing pad, OrigBB, by introducing two new basic blocks into the function.

One of those new basic blocks gets the predecessors listed in Preds. The other basic block gets the remaining predecessors of OrigBB. The landingpad instruction OrigBB is clone into both of the new basic blocks. The new blocks are given the suffixes 'Suffix1' and 'Suffix2', and are returned in the NewBBs vector.

This currently updates the LLVM IR, DominatorTree, LoopInfo, and LCCSA but no other analyses. In particular, it does not preserve LoopSimplify (because it's complicated to handle the case where one of the edges being split is an exit of a loop with other exits).

Definition at line 625 of file BasicBlockUtils.cpp.

References llvm::PHINode::addIncoming(), assert(), llvm::Instruction::clone(), llvm::BranchInst::Create(), llvm::BasicBlock::Create(), llvm::PHINode::Create(), llvm::Instruction::eraseFromParent(), llvm::BasicBlock::getContext(), llvm::Instruction::getDebugLoc(), llvm::BasicBlock::getFirstInsertionPt(), llvm::BasicBlock::getFirstNonPHI(), llvm::BasicBlock::getInstList(), llvm::BasicBlock::getLandingPadInst(), llvm::Value::getName(), llvm::BasicBlock::getParent(), llvm::BasicBlock::getTerminator(), llvm::Value::getType(), llvm::BasicBlock::isLandingPad(), llvm::Type::isTokenTy(), pred_begin(), pred_end(), llvm::Value::replaceAllUsesWith(), llvm::Instruction::setDebugLoc(), llvm::Value::setName(), UpdateAnalysisInformation(), UpdatePHINodes(), and llvm::Value::use_empty().

Referenced by SplitBlockPredecessors().

◆ SplitModule()

void llvm::SplitModule ( std::unique_ptr< Module M,
unsigned  N,
function_ref< void(std::unique_ptr< Module > MPart)>  ModuleCallback,
bool  PreserveLocals = false 
)

Splits the module M into N linkable partitions.

The function ModuleCallback is called N times passing each individual partition as the MPart argument.

FIXME: This function does not deal with the somewhat subtle symbol visibility issues around module splitting, including (but not limited to):

  • Internal symbols should not collide with symbols defined outside the module.
  • Internal symbols defined in module-level inline asm should be visible to each partition.

Definition at line 249 of file SplitModule.cpp.

References CloneModule(), externalize(), F, findPartitions(), I, isInPartition(), and N.

◆ stripDebugInfo()

bool llvm::stripDebugInfo ( Function F)

◆ StripDebugInfo()

bool llvm::StripDebugInfo ( Module M)

Strip debug info in the module if it exists.

To do this, we remove all calls to the debugger intrinsics and any named metadata for debugging. We also remove debug locations for instructions. Return true if module is modified.

Definition at line 350 of file DebugInfo.cpp.

References llvm::NamedMDNode::eraseFromParent(), F, llvm::NamedMDNode::getName(), llvm::LLVMContext::MD_dbg, and stripDebugInfo().

Referenced by LLVMStripModuleDebugInfo(), and UpgradeDebugInfo().

◆ stripGetElementPtr()

Value * llvm::stripGetElementPtr ( Value Ptr,
ScalarEvolution SE,
Loop Lp 
)

If the argument is a GEP, then returns the operand identified by getGEPInductionOperand.

However, if there is some other non-loop-invariant operand, it returns that instead.

Definition at line 150 of file VectorUtils.cpp.

References getGEPInductionOperand(), llvm::User::getNumOperands(), llvm::User::getOperand(), llvm::ScalarEvolution::getSCEV(), and llvm::ScalarEvolution::isLoopInvariant().

Referenced by getStrideFromPointer().

◆ stripIntegerCast()

Value * llvm::stripIntegerCast ( Value V)

Definition at line 137 of file LoopAccessAnalysis.cpp.

Referenced by replaceSymbolicStrideSCEV().

◆ stripNonLineTableDebugInfo()

bool llvm::stripNonLineTableDebugInfo ( Module M)

Downgrade the debug info in a module to contain only line table information.

In order to convert debug info to what -gline-tables-only would have created, this does the following: 1) Delete all debug intrinsics. 2) Delete all non-CU named metadata debug info nodes. 3) Create new DebugLocs for each instruction. 4) Create a new CU debug info, and similarly for every metadata node that's reachable from the CU debug info. All debug type metadata nodes are unreachable and garbage collected.

Definition at line 589 of file DebugInfo.cpp.

References F, llvm::DebugLoc::get(), llvm::NamedMDNode::getName(), llvm::DIScope::getScope(), I, llvm::LLVMContext::MD_dbg, N, and llvm::MDNode::operands().

◆ SubOne()

static Constant * llvm::SubOne ( Constant C)
inlinestatic

Subtract one from a Constant.

Definition at line 134 of file InstCombineInternal.h.

References llvm::DITypeRefArray::get(), and llvm::ConstantExpr::getSub().

Referenced by llvm::InstCombiner::visitSub().

◆ succ_begin() [1/6]

succ_iterator llvm::succ_begin ( BasicBlock BB)
inline

Definition at line 266 of file CFG.h.

References llvm::BasicBlock::getTerminator().

◆ succ_begin() [2/6]

succ_const_iterator llvm::succ_begin ( const BasicBlock BB)
inline

Definition at line 269 of file CFG.h.

References llvm::BasicBlock::getTerminator().

◆ succ_begin() [3/6]

succ_const_iterator llvm::succ_begin ( const Instruction I)
inline

Definition at line 246 of file CFG.h.

References I.

◆ succ_begin() [4/6]

succ_iterator llvm::succ_begin ( Instruction I)
inline

Definition at line 245 of file CFG.h.

References I.

◆ succ_begin() [5/6]

Interval::succ_iterator llvm::succ_begin ( Interval I)
inline

◆ succ_begin() [6/6]

template<class NodeRef , class BlockT , class RegionT >
RNSuccIterator< NodeRef, BlockT, RegionT > llvm::succ_begin ( NodeRef  Node)
inline

Definition at line 242 of file RegionIterator.h.

◆ succ_empty() [1/2]

bool llvm::succ_empty ( const BasicBlock BB)
inline

Definition at line 278 of file CFG.h.

References succ_begin(), and succ_end().

◆ succ_empty() [2/2]

bool llvm::succ_empty ( const Instruction I)
inline

◆ succ_end() [1/6]

succ_iterator llvm::succ_end ( BasicBlock BB)
inline

Definition at line 272 of file CFG.h.

References llvm::BasicBlock::getTerminator().

◆ succ_end() [2/6]

succ_const_iterator llvm::succ_end ( const BasicBlock BB)
inline

Definition at line 275 of file CFG.h.

References llvm::BasicBlock::getTerminator().

◆ succ_end() [3/6]

succ_const_iterator llvm::succ_end ( const Instruction I)
inline

Definition at line 250 of file CFG.h.

References I.

◆ succ_end() [4/6]

succ_iterator llvm::succ_end ( Instruction I)
inline

Definition at line 249 of file CFG.h.

References I.

◆ succ_end() [5/6]

Interval::succ_iterator llvm::succ_end ( Interval I)
inline

◆ succ_end() [6/6]

template<class NodeRef , class BlockT , class RegionT >
RNSuccIterator< NodeRef, BlockT, RegionT > llvm::succ_end ( NodeRef  Node)
inline

Definition at line 247 of file RegionIterator.h.

◆ succ_size() [1/2]

unsigned llvm::succ_size ( const BasicBlock BB)
inline

Definition at line 281 of file CFG.h.

References succ_begin(), and succ_end().

◆ succ_size() [2/2]

unsigned llvm::succ_size ( const Instruction I)
inline

Definition at line 256 of file CFG.h.

References I, succ_begin(), and succ_end().

Referenced by llvm::BranchProbabilityInfo::getEdgeProbability(), and MergeBlockIntoPredecessor().

◆ successors() [1/4]

succ_range llvm::successors ( BasicBlock BB)
inline

Definition at line 284 of file CFG.h.

References succ_begin(), and succ_end().

◆ successors() [2/4]

succ_const_range llvm::successors ( const BasicBlock BB)
inline

Definition at line 287 of file CFG.h.

References succ_begin(), and succ_end().

◆ successors() [3/4]

succ_const_range llvm::successors ( const Instruction I)
inline

Definition at line 262 of file CFG.h.

References I, succ_begin(), and succ_end().

◆ successors() [4/4]

succ_range llvm::successors ( Instruction I)
inline

Definition at line 259 of file CFG.h.

References I, succ_begin(), and succ_end().

Referenced by AddReachableCodeToWorklist(), llvm::LoopSafetyInfo::allLoopPathsLeadToBlock(), analyzeLoopUnrollCost(), buildClonedLoopBlocks(), llvm::CFGMST< Edge, BBInfo >::buildEdges(), calculateUnswitchCostMultiplier(), llvm::MemorySSAUpdater::changeCondBranchToUnconditionalTo(), llvm::MemorySSAUpdater::changeToUnreachable(), changeToUnreachable(), colorEHFunclets(), llvm::DivergencePropagator::computeJoinPoints(), computeLiveInValues(), computeLiveOutSeed(), ConnectEpilog(), ConnectProlog(), ConstantFoldTerminator(), containsCycle(), deleteDeadBlocksFromLoop(), deleteDeadClonedBlocks(), DetatchDeadBlocks(), DuplicateInstructionsInSplitBetween(), llvm::objcarc::FindDependencies(), formDedicatedExitBlocks(), getCommonExitBlock(), getOutliningPenalty(), HoistThenElseCodeToIf(), isProfitableToFoldUnconditional(), isSafeToHoistInvoke(), llvm::SyncDependenceAnalysis::join_blocks(), markAliveBlocks(), MergeBasicBlockIntoOnlyPred(), MergeBlockIntoPredecessor(), llvm::MemorySSAUpdater::moveAllAfterMergeBlocks(), llvm::MemorySSAUpdater::moveAllAfterSpliceBlocks(), processSwitch(), llvm::JumpThreadingPass::ProcessThreadableEdges(), llvm::MemorySSAUpdater::removeBlocks(), removeUnreachableBlocks(), llvm::BasicBlock::replaceSuccessorsPhiUsesWith(), SafeToMergeTerminators(), scanOneBB(), simplifyOneLoop(), SimplifyTerminatorOnSelect(), SplitCriticalEdge(), TryToSimplifyUncondBranchFromEmptyBlock(), llvm::JumpThreadingPass::TryToUnfoldSelectInCurrBB(), turnGuardIntoBranch(), UnrollLoop(), UnrollRuntimeLoopRemainder(), unswitchBestCondition(), and updateSuccessor().

◆ thinLTOInternalizeAndPromoteInIndex()

void llvm::thinLTOInternalizeAndPromoteInIndex ( ModuleSummaryIndex Index,
function_ref< bool(StringRef, GlobalValue::GUID)>  isExported 
)

Update the linkages in the given Index to mark exported values as external and non-exported values as internal.

The ThinLTO backends must apply the changes to the Module via thinLTOInternalizeModule.

Definition at line 411 of file LTO.cpp.

References I, and thinLTOInternalizeAndPromoteGUID().

Referenced by internalizeAndPromoteInIndex().

◆ thinLTOInternalizeModule()

void llvm::thinLTOInternalizeModule ( Module TheModule,
const GVSummaryMapTy DefinedGlobals 
)

Internalize TheModule based on the information recorded in the summaries during global summary-based analysis.

Run internalization on TheModule based on symmary analysis.

Definition at line 1014 of file FunctionImport.cpp.

References assert(), llvm::GlobalValue::getGlobalIdentifier(), llvm::GlobalValue::getGUID(), llvm::ModuleSummaryIndex::getOriginalNameBeforePromote(), llvm::Module::getSourceFileName(), internalizeModule(), llvm::GlobalValue::InternalLinkage, and llvm::GlobalValue::isLocalLinkage().

Referenced by llvm::ThinLTOCodeGenerator::internalize(), and llvm::lto::thinBackend().

◆ thinLTOResolvePrevailingInIndex()

void llvm::thinLTOResolvePrevailingInIndex ( ModuleSummaryIndex Index,
function_ref< bool(GlobalValue::GUID, const GlobalValueSummary *)>  isPrevailing,
function_ref< void(StringRef, GlobalValue::GUID, GlobalValue::LinkageTypes)>  recordNewLinkage,
const DenseSet< GlobalValue::GUID > &  GUIDPreservedSymbols 
)

Resolve linkage for prevailing symbols in the Index.

Linkage changes recorded in the index and the ThinLTO backends must apply the changes to the module via thinLTOResolvePrevailingInModule.

This is done for correctness (if value exported, ensure we always emit a copy), and compile-time optimization (allow drop of duplicates).

Definition at line 354 of file LTO.cpp.

References I, and thinLTOResolvePrevailingGUID().

◆ thinLTOResolvePrevailingInModule()

void llvm::thinLTOResolvePrevailingInModule ( Module TheModule,
const GVSummaryMapTy DefinedGlobals 
)

Resolve prevailing symbol linkages in TheModule based on the information recorded in the summaries during global summary-based analysis.

Fixup prevailing symbol linkages in TheModule based on summary analysis.

Definition at line 941 of file FunctionImport.cpp.

References llvm::Module::aliases(), assert(), convertToDeclaration(), dbgs(), llvm::Module::globals(), llvm::GlobalValue::HiddenVisibility, llvm::GlobalValue::isAvailableExternallyLinkage(), llvm::GlobalValue::isInterposableLinkage(), llvm::GlobalValue::isLocalLinkage(), LLVM_DEBUG, llvm_unreachable, llvm::GlobalValue::WeakAnyLinkage, and llvm::GlobalValue::WeakODRLinkage.

Referenced by llvm::ThinLTOCodeGenerator::internalize(), llvm::ThinLTOCodeGenerator::promote(), and llvm::lto::thinBackend().

◆ timeTraceProfilerBegin() [1/2]

void llvm::timeTraceProfilerBegin ( StringRef  Name,
llvm::function_ref< std::string()>  Detail 
)

◆ timeTraceProfilerBegin() [2/2]

void llvm::timeTraceProfilerBegin ( StringRef  Name,
StringRef  Detail 
)

Manually begin a time section, with the given Name and Detail.

Profiler copies the string data, so the pointers can be given into temporaries. Time sections can be hierarchical; every Begin must have a matching End pair but they can nest.

Definition at line 183 of file TimeProfiler.cpp.

References llvm::TimeTraceProfiler::begin(), and TimeTraceProfilerInstance.

Referenced by llvm::TimeTraceScope::TimeTraceScope().

◆ timeTraceProfilerCleanup()

void llvm::timeTraceProfilerCleanup ( )

Cleanup the time trace profiler, if it was initialized.

Definition at line 172 of file TimeProfiler.cpp.

References TimeTraceProfilerInstance.

◆ timeTraceProfilerEnabled()

bool llvm::timeTraceProfilerEnabled ( )
inline

Is the time trace profiler enabled, i.e. initialized?

Definition at line 28 of file TimeProfiler.h.

References TimeTraceProfilerInstance.

◆ timeTraceProfilerEnd()

void llvm::timeTraceProfilerEnd ( )

Manually end the last time section.

Definition at line 194 of file TimeProfiler.cpp.

References llvm::TimeTraceProfiler::end(), and TimeTraceProfilerInstance.

Referenced by llvm::TimeTraceScope::~TimeTraceScope().

◆ timeTraceProfilerInitialize()

void llvm::timeTraceProfilerInitialize ( )

Initialize the time trace profiler.

This sets up the global TimeTraceProfilerInstance variable to be the profiler instance.

Definition at line 166 of file TimeProfiler.cpp.

References assert(), and TimeTraceProfilerInstance.

◆ timeTraceProfilerWrite()

void llvm::timeTraceProfilerWrite ( raw_pwrite_stream OS)

Write profiling data to output file.

Data produced is JSON, in Chrome "Trace Event" format, see https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview

Definition at line 177 of file TimeProfiler.cpp.

References assert(), TimeTraceProfilerInstance, and llvm::TimeTraceProfiler::Write().

◆ to_hexString()

const std::string llvm::to_hexString ( uint64_t  Value,
bool  UpperCase = true 
)

Definition at line 15 of file ScopedPrinter.cpp.

References format_hex_no_prefix(), and llvm::raw_string_ostream::str().

Referenced by operator<<().

◆ to_string()

template<class T >
const std::string llvm::to_string ( const T &  Value)

◆ toCABI()

AtomicOrderingCABI llvm::toCABI ( AtomicOrdering  ao)
inline

Definition at line 135 of file AtomicOrdering.h.

References acq_rel, acquire, consume, relaxed, release, and seq_cst.

◆ toIRString()

const char * llvm::toIRString ( AtomicOrdering  ao)
inline

String used by LLVM IR to represent atomic ordering.

Definition at line 80 of file AtomicOrdering.h.

◆ toString()

std::string llvm::toString ( Error  E)
inline

◆ totalExponent()

static int llvm::totalExponent ( StringRef::iterator  p,
StringRef::iterator  end,
int  exponentAdjustment 
)
static

Definition at line 277 of file APFloat.cpp.

References assert(), decDigitValue(), and value.

◆ trailingHexadecimalFraction()

static lostFraction llvm::trailingHexadecimalFraction ( StringRef::iterator  p,
StringRef::iterator  end,
unsigned int  digitValue 
)
static

Definition at line 426 of file APFloat.cpp.

References assert().

◆ TryToSimplifyUncondBranchFromEmptyBlock()

bool llvm::TryToSimplifyUncondBranchFromEmptyBlock ( BasicBlock BB,
DomTreeUpdater DTU = nullptr 
)

BB is known to contain an unconditional branch, and contains no instructions other than PHI nodes, potential debug intrinsics and the branch.

TryToSimplifyUncondBranchFromEmptyBlock - BB is known to contain an unconditional branch, and contains no instructions other than PHI nodes, potential side-effect free intrinsics and the branch.

If possible, eliminate BB by rewriting all the predecessors to branch to the successor block and return true. If we can't transform, return false.

Definition at line 964 of file Local.cpp.

References llvm::DomTreeUpdater::applyUpdatesPermissive(), assert(), llvm::BasicBlock::begin(), CanPropagatePredecessorsForPHIs(), dbgs(), llvm::DomTreeUpdater::deleteBB(), llvm::BasicBlock::eraseFromParent(), llvm::Instruction::eraseFromParent(), llvm::BasicBlock::front(), llvm::BasicBlock::getContext(), llvm::Function::getEntryBlock(), llvm::BasicBlock::getFirstNonPHI(), llvm::BasicBlock::getInstList(), llvm::LLVMContext::getMDKindID(), llvm::Instruction::getMetadata(), llvm::BasicBlock::getParent(), llvm::BasicBlock::getSinglePredecessor(), llvm::BasicBlock::getTerminator(), llvm::Value::hasName(), I, LLVM_DEBUG, pred_begin(), pred_end(), redirectValuesFromPredecessorsToPhi(), llvm::Value::replaceAllUsesWith(), llvm::Instruction::setMetadata(), succ_empty(), succ_end(), successors(), and llvm::Value::takeName().

Referenced by llvm::JumpThreadingPass::runImpl().

◆ ulpsFromBoundary()

static APFloatBase::integerPart llvm::ulpsFromBoundary ( const APFloatBase::integerPart *  parts,
unsigned int  bits,
bool  isNearest 
)
static

Definition at line 527 of file APFloat.cpp.

References assert(), and bits.

◆ unionModRef()

LLVM_NODISCARD ModRefInfo llvm::unionModRef ( const ModRefInfo  MRI1,
const ModRefInfo  MRI2 
)
inline

◆ unique_dyn_cast() [1/2]

template<class X , class Y >
LLVM_NODISCARD auto llvm::unique_dyn_cast ( std::unique_ptr< Y > &&  Val) -> decltype(cast<X>(Val))
inline

Definition at line 385 of file Casting.h.

◆ unique_dyn_cast() [2/2]

template<class X , class Y >
LLVM_NODISCARD auto llvm::unique_dyn_cast ( std::unique_ptr< Y > &  Val) -> decltype(cast<X>(Val))
inline

Definition at line 377 of file Casting.h.

◆ unique_dyn_cast_or_null() [1/2]

template<class X , class Y >
LLVM_NODISCARD auto llvm::unique_dyn_cast_or_null ( std::unique_ptr< Y > &&  Val) -> decltype(cast<X>(Val))
inline

Definition at line 401 of file Casting.h.

◆ unique_dyn_cast_or_null() [2/2]

template<class X , class Y >
LLVM_NODISCARD auto llvm::unique_dyn_cast_or_null ( std::unique_ptr< Y > &  Val) -> decltype(cast<X>(Val))
inline

Definition at line 393 of file Casting.h.

◆ uniteAccessGroups()

MDNode * llvm::uniteAccessGroups ( MDNode AccGroups1,
MDNode AccGroups2 
)

Compute the union of two access-group lists.

If the list contains just one access group, it is returned directly. If the list is empty, returns nullptr.

Definition at line 524 of file VectorUtils.cpp.

References addToAccessGroupList(), llvm::MDNode::get(), and llvm::MDNode::getContext().

Referenced by PropagateParallelLoopAccessMetadata().

◆ UnrollAndJamLoop()

LoopUnrollResult llvm::UnrollAndJamLoop ( Loop L,
unsigned  Count,
unsigned  TripCount,
unsigned  TripMultiple,
bool  UnrollRemainder,
LoopInfo LI,
ScalarEvolution SE,
DominatorTree DT,
AssumptionCache AC,
OptimizationRemarkEmitter ORE,
Loop **  EpilogueLoop = nullptr 
)

Definition at line 173 of file LoopUnrollAndJam.cpp.

References llvm::LoopBase< BlockT, LoopT >::addBasicBlockToLoop(), llvm::DominatorTreeBase< NodeT, IsPostDom >::addNewBlock(), llvm::DominatorTreeBase< NodeT, IsPostDom >::applyUpdates(), assert(), llvm::BasicBlock::back(), llvm::BasicBlock::begin(), llvm::ValueMap< KeyT, ValueT, Config >::begin(), llvm::LoopBase< BlockT, LoopT >::begin(), llvm::LoopBlocksDFS::beginRPO(), CloneBasicBlock(), llvm::LoopBase< BlockT, LoopT >::contains(), llvm::BranchInst::Create(), dbgs(), DEBUG_TYPE, llvm::OptimizationRemarkEmitter::emit(), llvm::ValueMap< KeyT, ValueT, Config >::end(), llvm::LoopBlocksDFS::endRPO(), llvm::LoopInfo::erase(), llvm::Instruction::eraseFromParent(), llvm::ScalarEvolution::forgetLoop(), llvm::Function::getBasicBlockList(), llvm::LoopBase< BlockT, LoopT >::getBlocks(), llvm::LoopBase< BlockT, LoopT >::getExitBlock(), llvm::LoopBase< BlockT, LoopT >::getExitingBlock(), llvm::LoopBase< BlockT, LoopT >::getHeader(), llvm::DomTreeNodeBase< NodeT >::getIDom(), llvm::LoopBase< BlockT, LoopT >::getLoopLatch(), llvm::LoopBase< BlockT, LoopT >::getLoopPreheader(), llvm::Value::getName(), llvm::DominatorTreeBase< NodeT, IsPostDom >::getNode(), llvm::BasicBlock::getParent(), llvm::LoopBase< BlockT, LoopT >::getParentLoop(), llvm::Loop::getStartLoc(), llvm::LoopBase< BlockT, LoopT >::getSubLoops(), llvm::BranchInst::getSuccessor(), llvm::Instruction::getSuccessor(), llvm::BasicBlock::getTerminator(), llvm::BasicBlock::getUniquePredecessor(), I, llvm::Function::isDebugInfoForProfiling(), llvm::Loop::isLoopSimplifyForm(), llvm::Loop::isRecursivelyLCSSAForm(), llvm::BranchInst::isUnconditional(), LLVM_DEBUG, llvm_unreachable, MergeBlockIntoPredecessor(), llvm::Instruction::moveBefore(), moveHeaderPhiOperandsToForeBlocks(), partitionOuterLoopBlocks(), llvm::LoopBlocksDFS::perform(), llvm::AssumptionCache::registerAssumption(), remapInstruction(), llvm::BranchInst::setSuccessor(), simplifyLoopAfterUnroll(), UnrollRuntimeLoopRemainder(), and llvm::DominatorTreeBase< NodeT, IsPostDom >::verify().

Referenced by tryToUnrollAndJamLoop().

◆ UnrollLoop()

LoopUnrollResult llvm::UnrollLoop ( Loop L,
UnrollLoopOptions  ULO,
LoopInfo LI,
ScalarEvolution SE,
DominatorTree DT,
AssumptionCache AC,
OptimizationRemarkEmitter ORE,
bool  PreserveLCSSA,
Loop **  RemainderLoop = nullptr 
)

Unroll the given loop by Count.

The loop must be in LCSSA form. Unrolling can only fail when the loop's latch block is not terminated by a conditional branch instruction. However, if the trip count (and multiple) are not known, loop unrolling will mostly produce more code that is no faster.

TripCount is the upper bound of the iteration on which control exits LatchBlock. Control may exit the loop prior to TripCount iterations either via an early branch in other loop block or via LatchBlock terminator. This is relaxed from the general definition of trip count which is the number of times the loop header executes. Note that UnrollLoop assumes that the loop counter test is in LatchBlock in order to remove unnecesssary instances of the test. If control can exit the loop from the LatchBlock's terminator prior to TripCount iterations, flag PreserveCondBr needs to be set.

PreserveCondBr indicates whether the conditional branch of the LatchBlock needs to be preserved. It is needed when we use trip count upper bound to fully unroll the loop. If PreserveOnlyFirst is also set then only the first conditional branch needs to be preserved.

Similarly, TripMultiple divides the number of times that the LatchBlock may execute without exiting the loop.

If AllowRuntime is true then UnrollLoop will consider unrolling loops that have a runtime (i.e. not compile time constant) trip count. Unrolling these loops require a unroll "prologue" that runs "RuntimeTripCount % Count" iterations before branching into the unrolled loop. UnrollLoop will not runtime-unroll the loop if computing RuntimeTripCount will be expensive and AllowExpensiveTripCount is false.

If we want to perform PGO-based loop peeling, PeelCount is set to the number of iterations we want to peel off.

The LoopInfo Analysis that is passed will be kept consistent.

This utility preserves LoopInfo. It will also preserve ScalarEvolution and DominatorTree if they are non-null.

If RemainderLoop is non-null, it will receive the remainder loop (if required and not fully unrolled).

Definition at line 276 of file LoopUnroll.cpp.

References addClonedBlockToLoopInfo(), llvm::DominatorTreeBase< NodeT, IsPostDom >::addNewBlock(), llvm::UnrollLoopOptions::AllowExpensiveTripCount, llvm::UnrollLoopOptions::AllowRuntime, assert(), llvm::BasicBlock::back(), llvm::BasicBlock::begin(), llvm::ValueMap< KeyT, ValueT, Config >::begin(), llvm::LoopBlocksDFS::beginRPO(), llvm::LoopBase< BlockT, LoopT >::blocks(), llvm::DominatorTreeBase< NodeT, IsPostDom >::changeImmediateDominator(), CloneBasicBlock(), llvm::LoopBase< BlockT, LoopT >::contains(), llvm::UnrollLoopOptions::Count, llvm::BranchInst::Create(), dbgs(), DEBUG_TYPE, llvm::OptimizationRemarkEmitter::emit(), llvm::ValueMap< KeyT, ValueT, Config >::end(), llvm::LoopBlocksDFS::endRPO(), llvm::LoopInfo::erase(), llvm::Instruction::eraseFromParent(), llvm::ValueMap< KeyT, ValueT, Config >::find(), llvm::DominatorTreeBase< NodeT, IsPostDom >::findNearestCommonDominator(), llvm::UnrollLoopOptions::Force, llvm::ScalarEvolution::forgetAllLoops(), llvm::UnrollLoopOptions::ForgetAllSCEV, llvm::ScalarEvolution::forgetTopmostLoop(), formLCSSARecursively(), llvm::Function::getBasicBlockList(), llvm::LoopBase< BlockT, LoopT >::getBlocks(), llvm::Value::getContext(), llvm::LoopBase< BlockT, LoopT >::getExitBlocks(), llvm::LoopBase< BlockT, LoopT >::getExitingBlock(), llvm::LoopBase< BlockT, LoopT >::getHeader(), llvm::DomTreeNodeBase< NodeT >::getIDom(), llvm::PHINode::getIncomingValueForBlock(), llvm::BasicBlock::getInstList(), llvm::LoopInfoBase< BlockT, LoopT >::getLoopFor(), llvm::LoopBase< BlockT, LoopT >::getLoopLatch(), llvm::LoopBase< BlockT, LoopT >::getLoopPreheader(), llvm::Value::getName(), llvm::DominatorTreeBase< NodeT, IsPostDom >::getNode(), llvm::BasicBlock::getParent(), llvm::LoopBase< BlockT, LoopT >::getParentLoop(), llvm::ScalarEvolution::getSmallConstantTripCount(), llvm::ScalarEvolution::getSmallConstantTripMultiple(), llvm::Loop::getStartLoc(), llvm::BranchInst::getSuccessor(), llvm::BasicBlock::getTerminator(), llvm::BasicBlock::getUniquePredecessor(), GreatestCommonDivisor64(), llvm::BasicBlock::hasAddressTaken(), I, llvm::BranchInst::isConditional(), llvm::Function::isDebugInfoForProfiling(), isEpilogProfitable(), llvm::Loop::isLCSSAForm(), llvm::LoopBase< BlockT, LoopT >::isLoopExiting(), llvm::Loop::isSafeToClone(), llvm::BranchInst::isUnconditional(), LLVM_DEBUG, MergeBlockIntoPredecessor(), needToInsertPhisForLCSSA(), llvm::UnrollLoopOptions::PeelCount, peelLoop(), llvm::LoopBlocksDFS::perform(), predecessors(), llvm::UnrollLoopOptions::PreserveCondBr, llvm::UnrollLoopOptions::PreserveOnlyFirst, llvm::AssumptionCache::registerAssumption(), remapInstruction(), llvm::ValueMapIterator< DenseMapT, KeyT >::ValueTypeProxy::second, simplifyLoop(), simplifyLoopAfterUnroll(), successors(), llvm::UnrollLoopOptions::TripCount, llvm::UnrollLoopOptions::TripMultiple, llvm::UnrollLoopOptions::UnrollRemainder, UnrollRuntimeEpilog, UnrollRuntimeLoopRemainder(), UnrollVerifyDomtree, and llvm::DominatorTreeBase< NodeT, IsPostDom >::verify().

Referenced by tryToUnrollLoop(), and UnrollRuntimeLoopRemainder().

◆ UnrollRuntimeLoopRemainder()

bool llvm::UnrollRuntimeLoopRemainder ( Loop L,
unsigned  Count,
bool  AllowExpensiveTripCount,
bool  UseEpilogRemainder,
bool  UnrollRemainder,
bool  ForgetAllSCEV,
LoopInfo LI,
ScalarEvolution SE,
DominatorTree DT,
AssumptionCache AC,
bool  PreserveLCSSA,
Loop **  ResultLoop = nullptr 
)

Insert code in the prolog/epilog code when unrolling a loop with a run-time trip-count.

This method assumes that the loop unroll factor is total number of loop bodies in the loop after unrolling. (Some folks refer to the unroll factor as the number of extra copies added). We assume also that the loop unroll factor is a power-of-two. So, after unrolling the loop, the number of loop bodies executed is 2, 4, 8, etc. Note - LLVM converts the if-then-sequence to a switch instruction in SimplifyCFG.cpp. Then, the backend decides how code for the switch instruction is generated.

Prolog case extraiters = tripcount % loopfactor if (extraiters == 0) jump Loop: else jump Prol: Prol: LoopBody; extraiters -= 1 // Omitted if unroll factor is 2. if (extraiters != 0) jump Prol: // Omitted if unroll factor is 2. if (tripcount < loopfactor) jump End: Loop: ... End:

Epilog case extraiters = tripcount % loopfactor if (tripcount < loopfactor) jump LoopExit: unroll_iters = tripcount - extraiters Loop: LoopBody; (executes unroll_iter times); unroll_iter -= 1 if (unroll_iter != 0) jump Loop: LoopExit: if (extraiters == 0) jump EpilExit: Epil: LoopBody; (executes extraiters times) extraiters -= 1 // Omitted if unroll factor is 2. if (extraiters != 0) jump Epil: // Omitted if unroll factor is 2. EpilExit:

Definition at line 545 of file LoopUnrollRuntime.cpp.

References llvm::PHINode::addIncoming(), assert(), llvm::LoopBase< BlockT, LoopT >::blocks(), canProfitablyUnrollMultiExitLoop(), canSafelyUnrollMultiExitLoop(), llvm::DominatorTreeBase< NodeT, IsPostDom >::changeImmediateDominator(), CloneLoopBlocks(), ConnectEpilog(), ConnectProlog(), llvm::LoopBase< BlockT, LoopT >::contains(), llvm::PHINode::Create(), llvm::IRBuilder< T, Inserter >::CreateAdd(), llvm::IRBuilder< T, Inserter >::CreateAnd(), llvm::IRBuilder< T, Inserter >::CreateCondBr(), llvm::IRBuilder< T, Inserter >::CreateICmpULT(), llvm::IRBuilder< T, Inserter >::CreateIsNotNull(), llvm::IRBuilder< T, Inserter >::CreateIsNull(), llvm::IRBuilder< T, Inserter >::CreateSub(), llvm::IRBuilder< T, Inserter >::CreateURem(), dbgs(), llvm::Loop::dump(), llvm::Instruction::eraseFromParent(), llvm::SCEVExpander::expandCodeFor(), F, llvm::ScalarEvolution::forgetTopmostLoop(), formDedicatedExitBlocks(), llvm::ConstantInt::get(), llvm::ScalarEvolution::getAddExpr(), llvm::DomTreeNodeBase< NodeT >::getBlock(), llvm::ScalarEvolution::getConstant(), llvm::Module::getDataLayout(), llvm::Instruction::getDebugLoc(), llvm::ScalarEvolution::getExitCount(), llvm::LoopBase< BlockT, LoopT >::getExitingBlock(), llvm::BasicBlock::getFirstNonPHI(), llvm::LoopBase< BlockT, LoopT >::getHeader(), llvm::PHINode::getIncomingBlock(), llvm::PHINode::getIncomingValue(), llvm::LoopInfoBase< BlockT, LoopT >::getLoopFor(), llvm::LoopBase< BlockT, LoopT >::getLoopLatch(), llvm::LoopBase< BlockT, LoopT >::getLoopPreheader(), llvm::BasicBlock::getModule(), llvm::Value::getName(), llvm::DominatorTreeBase< NodeT, IsPostDom >::getNode(), llvm::PHINode::getNumIncomingValues(), llvm::BasicBlock::getParent(), llvm::BranchInst::getSuccessor(), llvm::BasicBlock::getTerminator(), llvm::SCEV::getType(), llvm::Value::getType(), llvm::LoopBase< BlockT, LoopT >::getUniqueNonLatchExitBlocks(), I, llvm::SCEVExpander::isHighCostExpansion(), llvm::Type::isIntegerTy(), llvm::Loop::isLoopSimplifyForm(), isPowerOf2_32(), llvm::BranchInst::isUnconditional(), LLVM_DEBUG, Log2_32(), llvm::ValueMap< KeyT, ValueT, Config >::lookup(), llvm::LoopBlocksDFS::perform(), predecessors(), RemapInstruction(), RF_IgnoreMissingLocals, RF_NoModuleLevelChanges, llvm::BranchInst::setCondition(), llvm::Instruction::setDebugLoc(), llvm::IRBuilderBase::SetInsertPoint(), llvm::Value::setName(), SplitBlock(), SplitBlockPredecessors(), SplitEdge(), successors(), UnrollLoop(), and llvm::DominatorTreeBase< NodeT, IsPostDom >::verify().

Referenced by UnrollAndJamLoop(), and UnrollLoop().

◆ unwrap() [1/9]

Attribute llvm::unwrap ( LLVMAttributeRef  Attr)
inline

Definition at line 203 of file Attributes.h.

References llvm::Attribute::fromRawPointer().

Referenced by LLVMAddAddDiscriminatorsPass(), LLVMAddAggressiveDCEPass(), LLVMAddAggressiveInstCombinerPass(), LLVMAddAlias(), LLVMAddAlignmentFromAssumptionsPass(), LLVMAddAlwaysInlinerPass(), LLVMAddArgumentPromotionPass(), LLVMAddAttributeAtIndex(), LLVMAddBasicAliasAnalysisPass(), LLVMAddBitTrackingDCEPass(), LLVMAddCalledValuePropagationPass(), LLVMAddCallSiteAttribute(), LLVMAddCase(), LLVMAddCFGSimplificationPass(), LLVMAddClause(), LLVMAddConstantMergePass(), LLVMAddConstantPropagationPass(), LLVMAddCoroCleanupPass(), LLVMAddCoroEarlyPass(), LLVMAddCoroElidePass(), LLVMAddCoroSplitPass(), LLVMAddCorrelatedValuePropagationPass(), LLVMAddDeadArgEliminationPass(), LLVMAddDeadStoreEliminationPass(), LLVMAddDemoteMemoryToRegisterPass(), LLVMAddDestination(), LLVMAddEarlyCSEMemSSAPass(), LLVMAddEarlyCSEPass(), LLVMAddFunction(), LLVMAddFunctionAttrsPass(), LLVMAddFunctionInliningPass(), LLVMAddGlobal(), LLVMAddGlobalDCEPass(), LLVMAddGlobalIFunc(), LLVMAddGlobalInAddressSpace(), LLVMAddGlobalOptimizerPass(), LLVMAddGVNHoistLegacyPass(), LLVMAddGVNPass(), LLVMAddHandler(), LLVMAddIncoming(), LLVMAddIndVarSimplifyPass(), LLVMAddInstructionCombiningPass(), LLVMAddInternalizePass(), LLVMAddIPConstantPropagationPass(), LLVMAddIPSCCPPass(), LLVMAddJumpThreadingPass(), LLVMAddLICMPass(), LLVMAddLoopDeletionPass(), LLVMAddLoopIdiomPass(), LLVMAddLoopRerollPass(), LLVMAddLoopRotatePass(), LLVMAddLoopSimplifyCFGPass(), LLVMAddLoopSinkPass(), LLVMAddLoopUnrollAndJamPass(), LLVMAddLoopUnrollPass(), LLVMAddLoopUnswitchPass(), LLVMAddLoopVectorizePass(), LLVMAddLowerAtomicPass(), LLVMAddLowerExpectIntrinsicPass(), LLVMAddLowerSwitchPass(), LLVMAddMemCpyOptPass(), LLVMAddMergedLoadStoreMotionPass(), LLVMAddModuleFlag(), LLVMAddNamedMetadataOperand(), LLVMAddNewGVNPass(), LLVMAddPartiallyInlineLibCallsPass(), LLVMAddPromoteMemoryToRegisterPass(), LLVMAddPruneEHPass(), LLVMAddReassociatePass(), LLVMAddScalarizerPass(), LLVMAddScalarReplAggregatesPass(), LLVMAddScalarReplAggregatesPassSSA(), LLVMAddScalarReplAggregatesPassWithThreshold(), LLVMAddSCCPPass(), LLVMAddScopedNoAliasAAPass(), LLVMAddSLPVectorizePass(), LLVMAddStripDeadPrototypesPass(), LLVMAddStripSymbolsPass(), LLVMAddTailCallEliminationPass(), LLVMAddTypeBasedAliasAnalysisPass(), LLVMAddUnifyFunctionExitNodesPass(), LLVMAddVerifierPass(), LLVMAlignOf(), LLVMAppendBasicBlockInContext(), LLVMAppendExistingBasicBlock(), LLVMAppendModuleInlineAsm(), LLVMArrayType(), LLVMBasicBlockAsValue(), LLVMBlockAddress(), LLVMBuildAdd(), LLVMBuildAddrSpaceCast(), LLVMBuildAggregateRet(), LLVMBuildAlloca(), LLVMBuildAnd(), LLVMBuildArrayAlloca(), LLVMBuildArrayMalloc(), LLVMBuildAShr(), LLVMBuildAtomicCmpXchg(), LLVMBuildAtomicRMW(), LLVMBuildBinOp(), LLVMBuildBitCast(), LLVMBuildBr(), LLVMBuildCall(), LLVMBuildCall2(), LLVMBuildCast(), LLVMBuildCatchPad(), LLVMBuildCatchRet(), LLVMBuildCatchSwitch(), LLVMBuildCleanupPad(), LLVMBuildCleanupRet(), LLVMBuildCondBr(), LLVMBuilderGetDefaultFPMathTag(), LLVMBuilderSetDefaultFPMathTag(), LLVMBuildExactSDiv(), LLVMBuildExactUDiv(), LLVMBuildExtractElement(), LLVMBuildExtractValue(), LLVMBuildFAdd(), LLVMBuildFCmp(), LLVMBuildFDiv(), LLVMBuildFence(), LLVMBuildFMul(), LLVMBuildFNeg(), LLVMBuildFPCast(), LLVMBuildFPExt(), LLVMBuildFPToSI(), LLVMBuildFPToUI(), LLVMBuildFPTrunc(), LLVMBuildFree(), LLVMBuildFRem(), LLVMBuildFSub(), LLVMBuildGEP(), LLVMBuildGEP2(), LLVMBuildGlobalString(), LLVMBuildGlobalStringPtr(), LLVMBuildICmp(), LLVMBuildInBoundsGEP(), LLVMBuildInBoundsGEP2(), LLVMBuildIndirectBr(), LLVMBuildInsertElement(), LLVMBuildInsertValue(), LLVMBuildIntCast(), LLVMBuildIntCast2(), LLVMBuildIntToPtr(), LLVMBuildInvoke(), LLVMBuildInvoke2(), LLVMBuildIsNotNull(), LLVMBuildIsNull(), LLVMBuildLandingPad(), LLVMBuildLoad(), LLVMBuildLoad2(), LLVMBuildLShr(), LLVMBuildMalloc(), LLVMBuildMemCpy(), LLVMBuildMemMove(), LLVMBuildMemSet(), LLVMBuildMul(), LLVMBuildNeg(), LLVMBuildNot(), LLVMBuildNSWAdd(), LLVMBuildNSWMul(), LLVMBuildNSWNeg(), LLVMBuildNSWSub(), LLVMBuildNUWAdd(), LLVMBuildNUWMul(), LLVMBuildNUWNeg(), LLVMBuildNUWSub(), LLVMBuildOr(), LLVMBuildPhi(), LLVMBuildPointerCast(), LLVMBuildPtrDiff(), LLVMBuildPtrToInt(), LLVMBuildResume(), LLVMBuildRet(), LLVMBuildRetVoid(), LLVMBuildSDiv(), LLVMBuildSelect(), LLVMBuildSExt(), LLVMBuildSExtOrBitCast(), LLVMBuildShl(), LLVMBuildShuffleVector(), LLVMBuildSIToFP(), LLVMBuildSRem(), LLVMBuildStore(), LLVMBuildStructGEP(), LLVMBuildStructGEP2(), LLVMBuildSub(), LLVMBuildSwitch(), LLVMBuildTrunc(), LLVMBuildTruncOrBitCast(), LLVMBuildUDiv(), LLVMBuildUIToFP(), LLVMBuildUnreachable(), LLVMBuildURem(), LLVMBuildVAArg(), LLVMBuildXor(), LLVMBuildZExt(), LLVMBuildZExtOrBitCast(), LLVMClearInsertionPosition(), LLVMCloneModule(), LLVMConstAddrSpaceCast(), LLVMConstAllOnes(), LLVMConstArray(), LLVMConstBitCast(), LLVMConstFPCast(), LLVMConstFPExt(), LLVMConstFPToSI(), LLVMConstFPToUI(), LLVMConstFPTrunc(), LLVMConstInlineAsm(), LLVMConstIntCast(), LLVMConstIntToPtr(), LLVMConstNamedStruct(), LLVMConstNull(), LLVMConstPointerCast(), LLVMConstPtrToInt(), LLVMConstReal(), LLVMConstRealOfString(), LLVMConstRealOfStringAndSize(), LLVMConstSExt(), LLVMConstSExtOrBitCast(), LLVMConstSIToFP(), LLVMConstStringInContext(), LLVMConstStructInContext(), LLVMConstTrunc(), LLVMConstTruncOrBitCast(), LLVMConstUIToFP(), LLVMConstZExt(), LLVMConstZExtOrBitCast(), LLVMConsumeError(), LLVMContextDispose(), LLVMContextGetDiagnosticContext(), LLVMContextGetDiagnosticHandler(), LLVMContextSetDiagnosticHandler(), LLVMContextSetDiscardValueNames(), LLVMContextSetYieldCallback(), LLVMContextShouldDiscardValueNames(), LLVMCopyModuleFlagsMetadata(), LLVMCreateBasicBlockInContext(), LLVMCreateBuilderInContext(), LLVMCreateDIBuilder(), LLVMCreateDIBuilderDisallowUnresolved(), LLVMCreateEnumAttribute(), LLVMCreateFunctionPassManagerForModule(), LLVMCreateStringAttribute(), LLVMDeleteBasicBlock(), LLVMDIBuilderCreateArrayType(), LLVMDIBuilderCreateArtificialType(), LLVMDIBuilderCreateAutoVariable(), LLVMDIBuilderCreateBasicType(), LLVMDIBuilderCreateBitFieldMemberType(), LLVMDIBuilderCreateClassType(), LLVMDIBuilderCreateCompileUnit(), LLVMDIBuilderCreateConstantValueExpression(), LLVMDIBuilderCreateDebugLocation(), LLVMDIBuilderCreateEnumerationType(), LLVMDIBuilderCreateEnumerator(), LLVMDIBuilderCreateExpression(), LLVMDIBuilderCreateFile(), LLVMDIBuilderCreateForwardDecl(), LLVMDIBuilderCreateFunction(), LLVMDIBuilderCreateGlobalVariableExpression(), LLVMDIBuilderCreateImportedDeclaration(), LLVMDIBuilderCreateImportedModuleFromAlias(), LLVMDIBuilderCreateImportedModuleFromModule(), LLVMDIBuilderCreateImportedModuleFromNamespace(), LLVMDIBuilderCreateInheritance(), LLVMDIBuilderCreateLexicalBlock(), LLVMDIBuilderCreateLexicalBlockFile(), LLVMDIBuilderCreateMemberPointerType(), LLVMDIBuilderCreateMemberType(), LLVMDIBuilderCreateModule(), LLVMDIBuilderCreateNameSpace(), LLVMDIBuilderCreateNullPtrType(), LLVMDIBuilderCreateObjCIVar(), LLVMDIBuilderCreateObjCProperty(), LLVMDIBuilderCreateObjectPointerType(), LLVMDIBuilderCreateParameterVariable(), LLVMDIBuilderCreatePointerType(), LLVMDIBuilderCreateQualifiedType(), LLVMDIBuilderCreateReferenceType(), LLVMDIBuilderCreateReplaceableCompositeType(), LLVMDIBuilderCreateStaticMemberType(), LLVMDIBuilderCreateStructType(), LLVMDIBuilderCreateSubroutineType(), LLVMDIBuilderCreateTempGlobalVariableFwdDecl(), LLVMDIBuilderCreateTypedef(), LLVMDIBuilderCreateUnionType(), LLVMDIBuilderCreateUnspecifiedType(), LLVMDIBuilderCreateVectorType(), LLVMDIBuilderFinalize(), LLVMDIBuilderGetOrCreateArray(), LLVMDIBuilderGetOrCreateSubrange(), LLVMDIBuilderGetOrCreateTypeArray(), LLVMDIBuilderInsertDbgValueAtEnd(), LLVMDIBuilderInsertDbgValueBefore(), LLVMDIBuilderInsertDeclareAtEnd(), LLVMDIBuilderInsertDeclareBefore(), LLVMDisposeBuilder(), LLVMDisposeDIBuilder(), LLVMDisposeMemoryBuffer(), LLVMDisposeModule(), LLVMDisposeModuleProvider(), LLVMDisposePassManager(), LLVMDoubleTypeInContext(), LLVMDumpModule(), LLVMDumpType(), LLVMDumpValue(), LLVMFloatTypeInContext(), LLVMFP128TypeInContext(), LLVMFunctionType(), LLVMGetBasicBlockName(), LLVMGetBasicBlockParent(), LLVMGetBasicBlockTerminator(), LLVMGetBufferSize(), LLVMGetBufferStart(), LLVMGetComdatSelectionKind(), LLVMGetCurrentDebugLocation(), LLVMGetCurrentDebugLocation2(), LLVMGetDataLayoutStr(), LLVMGetDebugLocColumn(), LLVMGetDebugLocDirectory(), LLVMGetDebugLocFilename(), LLVMGetDebugLocLine(), LLVMGetDiagInfoDescription(), LLVMGetDiagInfoSeverity(), LLVMGetEnumAttributeKind(), LLVMGetEnumAttributeValue(), LLVMGetErrorMessage(), LLVMGetFCmpPredicate(), LLVMGetFirstFunction(), LLVMGetFirstGlobal(), LLVMGetFirstGlobalAlias(), LLVMGetFirstGlobalIFunc(), LLVMGetFirstInstruction(), LLVMGetFirstNamedMetadata(), LLVMGetFirstUse(), LLVMGetICmpPredicate(), LLVMGetIndices(), LLVMGetInsertBlock(), LLVMGetInstructionOpcode(), LLVMGetIntrinsicDeclaration(), LLVMGetIntrinsicID(), LLVMGetLastFunction(), LLVMGetLastGlobal(), LLVMGetLastGlobalAlias(), LLVMGetLastGlobalIFunc(), LLVMGetLastInstruction(), LLVMGetLastNamedMetadata(), LLVMGetMDKindIDInContext(), LLVMGetMDNodeNumOperands(), LLVMGetMDNodeOperands(), LLVMGetMDString(), LLVMGetMetadataKind(), LLVMGetModuleContext(), LLVMGetModuleDebugMetadataVersion(), LLVMGetModuleFlag(), LLVMGetModuleIdentifier(), LLVMGetModuleInlineAsm(), LLVMGetNamedFunction(), LLVMGetNamedGlobal(), LLVMGetNamedGlobalAlias(), LLVMGetNamedGlobalIFunc(), LLVMGetNamedMetadata(), LLVMGetNamedMetadataNumOperands(), LLVMGetNamedMetadataOperands(), LLVMGetNextBasicBlock(), LLVMGetNextUse(), LLVMGetNumArgOperands(), LLVMGetNumContainedTypes(), LLVMGetNumIndices(), LLVMGetNumOperands(), LLVMGetOperand(), LLVMGetOperandUse(), LLVMGetOrInsertComdat(), LLVMGetOrInsertNamedMetadata(), LLVMGetPreviousBasicBlock(), LLVMGetSourceFileName(), LLVMGetStringAttributeKind(), LLVMGetStringAttributeValue(), LLVMGetSubtypes(), LLVMGetTarget(), LLVMGetTypeByName(), LLVMGetTypeContext(), LLVMGetTypeKind(), LLVMGetUndef(), LLVMGetUnwindDest(), LLVMGetUsedValue(), LLVMGetUser(), LLVMGetValueKind(), LLVMGetValueName(), LLVMGetValueName2(), LLVMGlobalCopyAllMetadata(), LLVMHalfTypeInContext(), LLVMInitializeAggressiveInstCombiner(), LLVMInitializeAnalysis(), LLVMInitializeCore(), LLVMInitializeInstCombine(), LLVMInitializeInstrumentation(), LLVMInitializeIPA(), LLVMInitializeIPO(), LLVMInitializeObjCARCOpts(), LLVMInitializeScalarOpts(), LLVMInitializeTransformUtils(), LLVMInitializeVectorization(), LLVMInsertBasicBlockInContext(), LLVMInsertExistingBasicBlockAfterInsertBlock(), LLVMInsertIntoBuilder(), LLVMInsertIntoBuilderWithName(), LLVMInstructionClone(), LLVMInt128TypeInContext(), LLVMInt16TypeInContext(), LLVMInt1TypeInContext(), LLVMInt32TypeInContext(), LLVMInt64TypeInContext(), LLVMInt8TypeInContext(), LLVMIntrinsicCopyOverloadedName(), LLVMIntrinsicGetType(), LLVMIntTypeInContext(), LLVMIsAMDNode(), LLVMIsAMDString(), LLVMIsATerminatorInst(), LLVMIsConstant(), LLVMIsEnumAttribute(), LLVMIsNull(), LLVMIsStringAttribute(), LLVMIsUndef(), LLVMLabelTypeInContext(), LLVMLinkModules2(), LLVMMDNodeInContext(), LLVMMDNodeInContext2(), LLVMMDStringInContext(), LLVMMDStringInContext2(), LLVMMetadataAsValue(), LLVMMetadataTypeInContext(), LLVMModuleCreateWithNameInContext(), LLVMMoveBasicBlockAfter(), LLVMMoveBasicBlockBefore(), LLVMParseIRInContext(), LLVMPassManagerBuilderDispose(), LLVMPassManagerBuilderPopulateFunctionPassManager(), LLVMPassManagerBuilderPopulateLTOPassManager(), LLVMPassManagerBuilderPopulateModulePassManager(), LLVMPassManagerBuilderSetDisableUnrollLoops(), LLVMPassManagerBuilderSetOptLevel(), LLVMPassManagerBuilderSetSizeLevel(), LLVMPassManagerBuilderUseInlinerWithThreshold(), LLVMPointerType(), LLVMPositionBuilder(), LLVMPositionBuilderAtEnd(), LLVMPositionBuilderBefore(), LLVMPPCFP128TypeInContext(), LLVMPrintModuleToFile(), LLVMPrintModuleToString(), LLVMPrintTypeToString(), LLVMPrintValueToString(), LLVMRemoveBasicBlockFromParent(), LLVMReplaceAllUsesWith(), LLVMRunPassManager(), LLVMSetArgOperand(), LLVMSetComdat(), LLVMSetComdatSelectionKind(), LLVMSetCondition(), LLVMSetCurrentDebugLocation(), LLVMSetCurrentDebugLocation2(), LLVMSetDataLayout(), LLVMSetInstDebugLocation(), LLVMSetModuleIdentifier(), LLVMSetModuleInlineAsm(), LLVMSetModuleInlineAsm2(), LLVMSetNormalDest(), LLVMSetOperand(), LLVMSetSourceFileName(), LLVMSetSuccessor(), LLVMSetTarget(), LLVMSetUnwindDest(), LLVMSetValueName(), LLVMSetValueName2(), LLVMSizeOf(), LLVMStripModuleDebugInfo(), LLVMStructCreateNamed(), LLVMStructSetBody(), LLVMStructTypeInContext(), LLVMTemporaryMDNode(), LLVMTokenTypeInContext(), LLVMTypeIsSized(), LLVMTypeOf(), LLVMValueAsMetadata(), LLVMValueIsBasicBlock(), LLVMVectorType(), LLVMVerifyModule(), LLVMVoidTypeInContext(), LLVMX86FP80TypeInContext(), and LLVMX86MMXTypeInContext().

◆ unwrap() [2/9]

LLVMContext ** llvm::unwrap ( LLVMContextRef *  Tys)
inline

Definition at line 351 of file LLVMContext.h.

◆ unwrap() [3/9]

Error llvm::unwrap ( LLVMErrorRef  ErrRef)
inline

Conversion from LLVMErrorRef to Error for C error bindings.

Definition at line 1306 of file Error.h.

◆ unwrap() [4/9]

Metadata ** llvm::unwrap ( LLVMMetadataRef *  MDs)
inline

Definition at line 144 of file Metadata.h.

◆ unwrap() [5/9]

Module * llvm::unwrap ( LLVMModuleProviderRef  MP)
inline

Definition at line 919 of file Module.h.

◆ unwrap() [6/9]

DataLayout * llvm::unwrap ( LLVMTargetDataRef  P)
inline

Definition at line 552 of file DataLayout.h.

References P.

◆ unwrap() [7/9]

Type ** llvm::unwrap ( LLVMTypeRef *  Tys)
inline

Definition at line 475 of file Type.h.

◆ unwrap() [8/9]

Value ** llvm::unwrap ( LLVMValueRef *  Vals)
inline

Definition at line 887 of file Value.h.

◆ unwrap() [9/9]

template<typename T >
T ** llvm::unwrap ( LLVMValueRef *  Vals,
unsigned  Length 
)
inline

Definition at line 892 of file Value.h.

References I.

◆ updateCGAndAnalysisManagerForFunctionPass()

LazyCallGraph::SCC & llvm::updateCGAndAnalysisManagerForFunctionPass ( LazyCallGraph G,
LazyCallGraph::SCC C,
LazyCallGraph::Node N,
CGSCCAnalysisManager AM,
CGSCCUpdateResult UR 
)

◆ updateCompilerUsed()

void llvm::updateCompilerUsed ( Module TheModule,
const TargetMachine &  TM,
const StringSet<> &  AsmUndefinedRefs 
)

Find all globals in TheModule that are referenced in AsmUndefinedRefs, as well as the user-supplied functions definitions that are also libcalls, and create or update the magic "llvm.compiler_used" global in TheModule.

Definition at line 122 of file UpdateCompilerUsed.cpp.

References appendToCompilerUsed().

◆ updateProfileCallee()

void llvm::updateProfileCallee ( Function Callee,
int64_t  entryDelta,
const ValueMap< const Value *, WeakTrackingVH > *  VMap = nullptr 
)

Updates profile information by adjusting the entry count by adding entryDelta then scaling callsite information by the new count divided by the old count.

VMap is used during inlinng to also update the new clone

Definition at line 1494 of file InlineFunction.cpp.

References llvm::ValueMap< KeyT, ValueT, Config >::count(), and I.

Referenced by updateCallProfile().

◆ UpgradeBitCastExpr()

Value * llvm::UpgradeBitCastExpr ( unsigned  Opc,
Constant C,
Type DestTy 
)

This is an auto-upgrade for bitcast constant expression between pointers with different address spaces: the instruction is replaced by a pair ptrtoint+inttoptr.

Definition at line 3788 of file AutoUpgrade.cpp.

References llvm::IRBuilderBase::getInt64Ty(), llvm::ConstantExpr::getIntToPtr(), llvm::Type::getPointerAddressSpace(), llvm::ConstantExpr::getPtrToInt(), and llvm::Type::isPtrOrPtrVectorTy().

◆ UpgradeBitCastInst()

Instruction * llvm::UpgradeBitCastInst ( unsigned  Opc,
Value V,
Type DestTy,
Instruction *&  Temp 
)

This is an auto-upgrade for bitcast between pointers with different address spaces: the instruction is replaced by a pair ptrtoint+inttoptr.

Definition at line 3766 of file AutoUpgrade.cpp.

References llvm::CastInst::Create(), llvm::Value::getContext(), llvm::IRBuilderBase::getInt64Ty(), llvm::Type::getPointerAddressSpace(), llvm::Value::getType(), and llvm::Type::isPtrOrPtrVectorTy().

◆ UpgradeCallsToIntrinsic()

void llvm::UpgradeCallsToIntrinsic ( Function F)

This is an auto-upgrade hook for any old intrinsic function syntaxes which need to have both the function updated as well as all calls updated to the new function.

This should only be run in a post-processing fashion so that it can update all calls to the old function.

Definition at line 3726 of file AutoUpgrade.cpp.

References assert(), F, UpgradeIntrinsicCall(), and UpgradeIntrinsicFunction().

◆ UpgradeDebugInfo()

bool llvm::UpgradeDebugInfo ( Module M)

◆ UpgradeGlobalVariable()

GlobalVariable * llvm::UpgradeGlobalVariable ( GlobalVariable GV)

◆ UpgradeInlineAsmString()

void llvm::UpgradeInlineAsmString ( std::string *  AsmStr)

Upgrade comment in call to inline asm that represents an objc retain release marker.

Definition at line 1627 of file AutoUpgrade.cpp.

◆ upgradeInstructionLoopAttachment()

MDNode * llvm::upgradeInstructionLoopAttachment ( MDNode N)

Upgrade the loop attachment metadata node.

Definition at line 4000 of file AutoUpgrade.cpp.

References llvm::MDTuple::get(), isOldLoopArgument(), N, and upgradeLoopArgument().

◆ UpgradeIntrinsicCall()

void llvm::UpgradeIntrinsicCall ( CallInst CI,
Function NewFn 
)

This is the complement to the above, replacing a specific call to an intrinsic function with a call to the specified new function.

Upgrade a call to an old intrinsic.

All argument and return casting must be provided to seamlessly integrate with existing context.

Definition at line 1639 of file AutoUpgrade.cpp.

References ApplyX86MaskOn1BitsVec(), llvm::CallBase::arg_operands(), assert(), llvm::Instruction::copyFastMathFlags(), llvm::IRBuilder< T, Inserter >::CreateAdd(), llvm::IRBuilder< T, Inserter >::CreateAlignedLoad(), llvm::IRBuilder< T, Inserter >::CreateAlignedStore(), llvm::IRBuilder< T, Inserter >::CreateAnd(), llvm::IRBuilder< T, Inserter >::CreateAtomicRMW(), llvm::IRBuilder< T, Inserter >::CreateBitCast(), llvm::IRBuilder< T, Inserter >::CreateCall(), llvm::IRBuilder< T, Inserter >::CreateExtractElement(), llvm::IRBuilder< T, Inserter >::CreateExtractValue(), llvm::IRBuilder< T, Inserter >::CreateFAdd(), llvm::IRBuilder< T, Inserter >::CreateFDiv(), llvm::IRBuilder< T, Inserter >::CreateFMul(), llvm::IRBuilder< T, Inserter >::CreateFNeg(), llvm::IRBuilder< T, Inserter >::CreateFPExt(), llvm::IRBuilder< T, Inserter >::CreateFSub(), llvm::IRBuilder< T, Inserter >::CreateICmp(), llvm::IRBuilder< T, Inserter >::CreateICmpEQ(), llvm::IRBuilder< T, Inserter >::CreateICmpSGE(), llvm::IRBuilder< T, Inserter >::CreateICmpSLE(), llvm::IRBuilder< T, Inserter >::CreateICmpUGE(), llvm::IRBuilder< T, Inserter >::CreateICmpULE(), llvm::IRBuilder< T, Inserter >::CreateInsertElement(), llvm::IRBuilder< T, Inserter >::CreateLoad(), llvm::IRBuilder< T, Inserter >::CreateMul(), llvm::IRBuilder< T, Inserter >::CreateNeg(), llvm::IRBuilder< T, Inserter >::CreateNot(), llvm::IRBuilder< T, Inserter >::CreateOr(), llvm::IRBuilder< T, Inserter >::CreatePointerCast(), llvm::IRBuilder< T, Inserter >::CreateSelect(), llvm::IRBuilder< T, Inserter >::CreateSExt(), llvm::IRBuilder< T, Inserter >::CreateShuffleVector(), llvm::IRBuilder< T, Inserter >::CreateSIToFP(), llvm::IRBuilder< T, Inserter >::CreateSub(), llvm::IRBuilder< T, Inserter >::CreateTrunc(), llvm::IRBuilder< T, Inserter >::CreateUIToFP(), llvm::IRBuilder< T, Inserter >::CreateVectorSplat(), llvm::IRBuilder< T, Inserter >::CreateXor(), llvm::IRBuilder< T, Inserter >::CreateZExt(), EmitX86ScalarSelect(), EmitX86Select(), llvm::Instruction::eraseFromParent(), F, llvm::AtomicRMWInst::FAdd, llvm::ConstantAsMetadata::get(), llvm::MDNode::get(), llvm::VectorType::get(), llvm::UndefValue::get(), llvm::ConstantAggregateZero::get(), llvm::ConstantFP::get(), llvm::ConstantInt::get(), llvm::CallBase::getArgOperand(), llvm::VectorType::getBitWidth(), llvm::CallBase::getCalledFunction(), llvm::Value::getContext(), llvm::Intrinsic::getDeclaration(), llvm::IRBuilderBase::getFalse(), llvm::IRBuilderBase::getFloatTy(), llvm::IRBuilderBase::getInt16Ty(), llvm::IRBuilderBase::getInt32Ty(), llvm::IRBuilderBase::getInt64Ty(), llvm::IRBuilderBase::getInt8(), llvm::IRBuilderBase::getInt8Ty(), llvm::VectorType::getInteger(), llvm::Function::getIntrinsicID(), llvm::Instruction::getModule(), llvm::Value::getName(), llvm::Constant::getNullValue(), llvm::CallBase::getNumArgOperands(), llvm::SequentialType::getNumElements(), llvm::User::getNumOperands(), llvm::User::getOperand(), llvm::Instruction::getParent(), llvm::Type::getPointerTo(), llvm::Type::getPrimitiveSizeInBits(), llvm::Type::getScalarSizeInBits(), llvm::Value::getType(), llvm::PointerType::getUnqual(), llvm::Type::getVectorElementType(), llvm::Type::getVectorNumElements(), getX86MaskVec(), I, llvm::Instruction::isFast(), llvm::Type::isFloatTy(), llvm::Type::isIntegerTy(), llvm_unreachable, llvm::Value::replaceAllUsesWith(), SequentiallyConsistent, llvm::CallBase::setCalledFunction(), llvm::IRBuilderBase::SetInsertPoint(), llvm::Instruction::setMetadata(), llvm::Value::setName(), upgradeAbs(), upgradeAVX512MaskToSelect(), upgradeIntMinMax(), upgradeMaskedCompare(), UpgradeMaskedLoad(), upgradeMaskedMove(), UpgradeMaskedStore(), UpgradeMaskToInt(), upgradePMULDQ(), UpgradeX86AddSubSatIntrinsics(), UpgradeX86ALIGNIntrinsics(), upgradeX86ConcatShift(), UpgradeX86MaskedShift(), UpgradeX86PSLLDQIntrinsics(), UpgradeX86PSRLDQIntrinsics(), upgradeX86Rotate(), upgradeX86vpcom(), and UpgradeX86VPERMT2Intrinsics().

Referenced by UpgradeCallsToIntrinsic().

◆ UpgradeIntrinsicFunction()

bool llvm::UpgradeIntrinsicFunction ( Function F,
Function *&  NewFn 
)

This is a more granular function that simply checks an intrinsic function for upgrading, and returns true if it requires upgrading.

It may return null in NewFn if the all calls to the original intrinsic function should be transformed to non-function-call instructions.

Definition at line 817 of file AutoUpgrade.cpp.

References assert(), F, llvm::Intrinsic::getAttributes(), and UpgradeIntrinsicFunction1().

Referenced by UpgradeCallsToIntrinsic().

◆ UpgradeModuleFlags()

bool llvm::UpgradeModuleFlags ( Module M)

◆ UpgradeRetainReleaseMarker()

bool llvm::UpgradeRetainReleaseMarker ( Module M)

This checks for objc retain release marker which should be upgraded.

It returns true if module is modified.

Definition at line 3834 of file AutoUpgrade.cpp.

References llvm::MDString::get(), llvm::MDNode::getOperand(), and llvm::NamedMDNode::getOperand().

◆ UpgradeSectionAttributes()

void llvm::UpgradeSectionAttributes ( Module M)

Definition at line 3925 of file AutoUpgrade.cpp.

References llvm::raw_svector_ostream::str().

◆ UpgradeTBAANode()

MDNode * llvm::UpgradeTBAANode ( MDNode TBAANode)

If the given TBAA tag uses the scalar TBAA format, create a new node corresponding to the upgrade to the struct-path aware TBAA format.

Otherwise return the TBAANode itself.

Definition at line 3744 of file AutoUpgrade.cpp.

References llvm::ConstantAsMetadata::get(), llvm::MDNode::get(), llvm::MDNode::getContext(), llvm::IRBuilderBase::getInt64Ty(), llvm::Constant::getNullValue(), llvm::MDNode::getNumOperands(), and llvm::MDNode::getOperand().

◆ upward_defs()

iterator_range< upward_defs_iterator > llvm::upward_defs ( const MemoryAccessPair Pair)
inline

Definition at line 1249 of file MemorySSA.h.

References upward_defs_begin(), and upward_defs_end().

◆ upward_defs_begin()

upward_defs_iterator llvm::upward_defs_begin ( const MemoryAccessPair Pair)
inline

Definition at line 1242 of file MemorySSA.h.

Referenced by checkClobberSanity(), and upward_defs().

◆ upward_defs_end()

upward_defs_iterator llvm::upward_defs_end ( )
inline

Definition at line 1246 of file MemorySSA.h.

Referenced by checkClobberSanity(), and upward_defs().

◆ VarAndRedzoneSize()

static size_t llvm::VarAndRedzoneSize ( size_t  Size,
size_t  Granularity,
size_t  Alignment 
)
static

Definition at line 41 of file ASanStackFrameLayout.cpp.

References alignTo().

Referenced by ComputeASanStackFrameLayout().

◆ vectorizeBasicBlock()

bool llvm::vectorizeBasicBlock ( Pass P,
BasicBlock BB,
const VectorizeConfig C = VectorizeConfig() 
)

Vectorize the BasicBlock.

Parameters
BBThe BasicBlock to be vectorized
PThe current running pass, should require AliasAnalysis and ScalarEvolution. After the vectorization, AliasAnalysis, ScalarEvolution and CFG are preserved.
Returns
True if the BB is changed, false otherwise.

◆ verifyFunction()

bool llvm::verifyFunction ( const Function F,
raw_ostream OS = nullptr 
)

Check a function for errors, useful for use when debugging a pass.

If there are no errors, the function returns false. If an error is found, a message describing the error is written to OS (if non-null) and true is returned.

Definition at line 4978 of file Verifier.cpp.

References F, llvm::GlobalValue::getParent(), and Verifier.

Referenced by llvm::CodeExtractor::extractCodeRegion(), llvm::ScalarEvolution::isLoopBackedgeGuardedByCond(), llvm::ScalarEvolution::isLoopEntryGuardedByCond(), LLVMVerifyFunction(), llvm::LoopVectorizePass::processLoop(), processLoopInVPlanNativePath(), llvm::VerifierAnalysis::run(), llvm::SLPVectorizerPass::runImpl(), and Verify().

◆ verifyModule() [1/2]

bool llvm::verifyModule ( bool BrokenDebugInfo,
const Module M,
raw_ostream OS 
)

Check a module for errors, but report debug info errors separately.

Otherwise behaves as the normal verifyModule. Debug info errors can be "recovered" from by stripping the debug info.

◆ verifyModule() [2/2]

bool llvm::verifyModule ( const Module M,
raw_ostream OS = nullptr,
bool BrokenDebugInfo = nullptr 
)

Check a module for errors.

If there are no errors, the function returns false. If an error is found, a message describing the error is written to OS (if non-null) and true is returned.

Returns
true if the module is broken. If BrokenDebugInfo is supplied, DebugInfo verification failures won't be considered as error and instead *BrokenDebugInfo will be set to true. Debug info errors can be "recovered" from by stripping the debug info.

Definition at line 4989 of file Verifier.cpp.

References F, and Verifier.

Referenced by LLVMVerifyModule(), llvm::VerifierAnalysis::run(), and UpgradeDebugInfo().

◆ verifySafepointIR()

void llvm::verifySafepointIR ( Function F)

Run the safepoint verifier over a single function. Crashes on failure.

Definition at line 236 of file SafepointIRVerifier.cpp.

References F.

◆ viewRegion() [1/2]

void llvm::viewRegion ( const llvm::Function F)

Analyze the regions of a function and open its GraphViz visualization in a viewer.

Useful to call in the debugger. Includes the instructions in each BasicBlock. The result of a new analysis may differ from the RegionInfo the pass manager currently holds.

Parameters
FFunction to analyze.

Definition at line 257 of file RegionPrinter.cpp.

References createRegionViewerPass(), F, and invokeFunctionPass().

◆ viewRegion() [2/2]

void llvm::viewRegion ( llvm::RegionInfo RI)

Open a viewer to display the GraphViz vizualization of the analysis result.

Practical to call in the debugger. Includes the instructions in each BasicBlock.

Parameters
RIThe analysis to display.

Definition at line 255 of file RegionPrinter.cpp.

References viewRegionInfo().

Referenced by llvm::RegionInfo::view().

◆ viewRegionOnly() [1/2]

void llvm::viewRegionOnly ( const llvm::Function F)

Analyze the regions of a function and open its GraphViz visualization in a viewer.

Useful to call in the debugger. Shows only the BasicBlock names without their instructions. The result of a new analysis may differ from the RegionInfo the pass manager currently holds.

Parameters
FFunction to analyze.

Definition at line 263 of file RegionPrinter.cpp.

References createRegionOnlyViewerPass(), F, and invokeFunctionPass().

◆ viewRegionOnly() [2/2]

void llvm::viewRegionOnly ( llvm::RegionInfo RI)

Open a viewer to display the GraphViz vizualization of the analysis result.

Useful to call in the debugger. Shows only the BasicBlock names without their instructions.

Parameters
RIThe analysis to display.

Definition at line 261 of file RegionPrinter.cpp.

References viewRegionInfo().

Referenced by llvm::RegionInfo::viewOnly().

◆ visitAll()

template<typename SV >
void llvm::visitAll ( const SCEV Root,
SV &  Visitor 
)

Use SCEVTraversal to visit all nodes in the given expression tree.

Definition at line 615 of file ScalarEvolutionExpressions.h.

References llvm::SCEVTraversal< SV >::visitAll().

Referenced by llvm::ScalarEvolution::collectParametricTerms(), isSafeToExpand(), and SCEVExprContains().

◆ wouldInstructionBeTriviallyDead()

bool llvm::wouldInstructionBeTriviallyDead ( Instruction I,
const TargetLibraryInfo TLI = nullptr 
)

Return true if the result produced by the instruction would have no side effects if it was not used.

This is equivalent to checking whether isInstructionTriviallyDead would be true if the use count was 0.

Definition at line 360 of file Local.cpp.

References I, isAllocLikeFn(), isFreeCall(), and isMathLibCallNoop().

Referenced by bitTrackingDCE(), and isInstructionTriviallyDead().

◆ wrap() [1/6]

LLVMAttributeRef llvm::wrap ( Attribute  Attr)
inline

Definition at line 198 of file Attributes.h.

References llvm::Attribute::getRawPointer().

Referenced by getMDNodeOperandImpl(), llvm_getMetadata(), LLVMAddAlias(), LLVMAddFunction(), LLVMAddGlobal(), LLVMAddGlobalIFunc(), LLVMAddGlobalInAddressSpace(), LLVMAliasGetAliasee(), LLVMAlignOf(), LLVMAppendBasicBlockInContext(), LLVMArrayType(), LLVMBasicBlockAsValue(), LLVMBlockAddress(), LLVMBuildAdd(), LLVMBuildAddrSpaceCast(), LLVMBuildAggregateRet(), LLVMBuildAlloca(), LLVMBuildAnd(), LLVMBuildArrayAlloca(), LLVMBuildArrayMalloc(), LLVMBuildAShr(), LLVMBuildAtomicCmpXchg(), LLVMBuildAtomicRMW(), LLVMBuildBinOp(), LLVMBuildBitCast(), LLVMBuildBr(), LLVMBuildCall(), LLVMBuildCall2(), LLVMBuildCast(), LLVMBuildCatchPad(), LLVMBuildCatchRet(), LLVMBuildCatchSwitch(), LLVMBuildCleanupPad(), LLVMBuildCleanupRet(), LLVMBuildCondBr(), LLVMBuilderGetDefaultFPMathTag(), LLVMBuildExactSDiv(), LLVMBuildExactUDiv(), LLVMBuildExtractElement(), LLVMBuildExtractValue(), LLVMBuildFAdd(), LLVMBuildFCmp(), LLVMBuildFDiv(), LLVMBuildFence(), LLVMBuildFMul(), LLVMBuildFNeg(), LLVMBuildFPCast(), LLVMBuildFPExt(), LLVMBuildFPToSI(), LLVMBuildFPToUI(), LLVMBuildFPTrunc(), LLVMBuildFree(), LLVMBuildFRem(), LLVMBuildFSub(), LLVMBuildGEP(), LLVMBuildGEP2(), LLVMBuildGlobalString(), LLVMBuildGlobalStringPtr(), LLVMBuildICmp(), LLVMBuildInBoundsGEP(), LLVMBuildInBoundsGEP2(), LLVMBuildIndirectBr(), LLVMBuildInsertElement(), LLVMBuildInsertValue(), LLVMBuildIntCast(), LLVMBuildIntCast2(), LLVMBuildIntToPtr(), LLVMBuildInvoke(), LLVMBuildInvoke2(), LLVMBuildIsNotNull(), LLVMBuildIsNull(), LLVMBuildLandingPad(), LLVMBuildLoad(), LLVMBuildLoad2(), LLVMBuildLShr(), LLVMBuildMalloc(), LLVMBuildMemCpy(), LLVMBuildMemMove(), LLVMBuildMemSet(), LLVMBuildMul(), LLVMBuildNeg(), LLVMBuildNot(), LLVMBuildNSWAdd(), LLVMBuildNSWMul(), LLVMBuildNSWNeg(), LLVMBuildNSWSub(), LLVMBuildNUWAdd(), LLVMBuildNUWMul(), LLVMBuildNUWNeg(), LLVMBuildNUWSub(), LLVMBuildOr(), LLVMBuildPhi(), LLVMBuildPointerCast(), LLVMBuildPtrDiff(), LLVMBuildPtrToInt(), LLVMBuildResume(), LLVMBuildRet(), LLVMBuildRetVoid(), LLVMBuildSDiv(), LLVMBuildSelect(), LLVMBuildSExt(), LLVMBuildSExtOrBitCast(), LLVMBuildShl(), LLVMBuildShuffleVector(), LLVMBuildSIToFP(), LLVMBuildSRem(), LLVMBuildStore(), LLVMBuildStructGEP(), LLVMBuildStructGEP2(), LLVMBuildSub(), LLVMBuildSwitch(), LLVMBuildTrunc(), LLVMBuildTruncOrBitCast(), LLVMBuildUDiv(), LLVMBuildUIToFP(), LLVMBuildUnreachable(), LLVMBuildURem(), LLVMBuildVAArg(), LLVMBuildXor(), LLVMBuildZExt(), LLVMBuildZExtOrBitCast(), LLVMCloneModule(), LLVMConstAdd(), LLVMConstAddrSpaceCast(), LLVMConstAllOnes(), LLVMConstAnd(), LLVMConstArray(), LLVMConstAShr(), LLVMConstBitCast(), LLVMConstExactSDiv(), LLVMConstExactUDiv(), LLVMConstExtractElement(), LLVMConstExtractValue(), LLVMConstFAdd(), LLVMConstFCmp(), LLVMConstFDiv(), LLVMConstFMul(), LLVMConstFNeg(), LLVMConstFPCast(), LLVMConstFPExt(), LLVMConstFPToSI(), LLVMConstFPToUI(), LLVMConstFPTrunc(), LLVMConstFRem(), LLVMConstFSub(), LLVMConstGEP(), LLVMConstICmp(), LLVMConstInBoundsGEP(), LLVMConstInlineAsm(), LLVMConstInsertElement(), LLVMConstInsertValue(), LLVMConstInt(), LLVMConstIntCast(), LLVMConstIntOfArbitraryPrecision(), LLVMConstIntOfString(), LLVMConstIntOfStringAndSize(), LLVMConstIntToPtr(), LLVMConstLShr(), LLVMConstMul(), LLVMConstNamedStruct(), LLVMConstNeg(), LLVMConstNot(), LLVMConstNSWAdd(), LLVMConstNSWMul(), LLVMConstNSWNeg(), LLVMConstNSWSub(), LLVMConstNull(), LLVMConstNUWAdd(), LLVMConstNUWMul(), LLVMConstNUWNeg(), LLVMConstNUWSub(), LLVMConstOr(), LLVMConstPointerCast(), LLVMConstPointerNull(), LLVMConstPtrToInt(), LLVMConstReal(), LLVMConstRealOfString(), LLVMConstRealOfStringAndSize(), LLVMConstSDiv(), LLVMConstSelect(), LLVMConstSExt(), LLVMConstSExtOrBitCast(), LLVMConstShl(), LLVMConstShuffleVector(), LLVMConstSIToFP(), LLVMConstSRem(), LLVMConstStringInContext(), LLVMConstStructInContext(), LLVMConstSub(), LLVMConstTrunc(), LLVMConstTruncOrBitCast(), LLVMConstUDiv(), LLVMConstUIToFP(), LLVMConstURem(), LLVMConstVector(), LLVMConstXor(), LLVMConstZExt(), LLVMConstZExtOrBitCast(), LLVMContextCreate(), LLVMCopyModuleFlagsMetadata(), LLVMCreateBasicBlockInContext(), LLVMCreateBuilderInContext(), LLVMCreateDIBuilder(), LLVMCreateDIBuilderDisallowUnresolved(), LLVMCreateEnumAttribute(), LLVMCreateFunctionPassManagerForModule(), LLVMCreateMemoryBufferWithContentsOfFile(), LLVMCreateMemoryBufferWithMemoryRange(), LLVMCreateMemoryBufferWithMemoryRangeCopy(), LLVMCreateMemoryBufferWithSTDIN(), LLVMCreatePassManager(), LLVMCreateStringAttribute(), LLVMDIBuilderCreateArrayType(), LLVMDIBuilderCreateArtificialType(), LLVMDIBuilderCreateAutoVariable(), LLVMDIBuilderCreateBasicType(), LLVMDIBuilderCreateBitFieldMemberType(), LLVMDIBuilderCreateClassType(), LLVMDIBuilderCreateCompileUnit(), LLVMDIBuilderCreateConstantValueExpression(), LLVMDIBuilderCreateDebugLocation(), LLVMDIBuilderCreateEnumerationType(), LLVMDIBuilderCreateEnumerator(), LLVMDIBuilderCreateExpression(), LLVMDIBuilderCreateFile(), LLVMDIBuilderCreateForwardDecl(), LLVMDIBuilderCreateFunction(), LLVMDIBuilderCreateGlobalVariableExpression(), LLVMDIBuilderCreateImportedDeclaration(), LLVMDIBuilderCreateImportedModuleFromAlias(), LLVMDIBuilderCreateImportedModuleFromModule(), LLVMDIBuilderCreateImportedModuleFromNamespace(), LLVMDIBuilderCreateInheritance(), LLVMDIBuilderCreateLexicalBlock(), LLVMDIBuilderCreateLexicalBlockFile(), LLVMDIBuilderCreateMemberPointerType(), LLVMDIBuilderCreateMemberType(), LLVMDIBuilderCreateModule(), LLVMDIBuilderCreateNameSpace(), LLVMDIBuilderCreateNullPtrType(), LLVMDIBuilderCreateObjCIVar(), LLVMDIBuilderCreateObjCProperty(), LLVMDIBuilderCreateObjectPointerType(), LLVMDIBuilderCreateParameterVariable(), LLVMDIBuilderCreatePointerType(), LLVMDIBuilderCreateQualifiedType(), LLVMDIBuilderCreateReferenceType(), LLVMDIBuilderCreateReplaceableCompositeType(), LLVMDIBuilderCreateStaticMemberType(), LLVMDIBuilderCreateStructType(), LLVMDIBuilderCreateSubroutineType(), LLVMDIBuilderCreateTempGlobalVariableFwdDecl(), LLVMDIBuilderCreateTypedef(), LLVMDIBuilderCreateUnionType(), LLVMDIBuilderCreateUnspecifiedType(), LLVMDIBuilderCreateVectorType(), LLVMDIBuilderGetOrCreateArray(), LLVMDIBuilderGetOrCreateSubrange(), LLVMDIBuilderGetOrCreateTypeArray(), LLVMDIBuilderInsertDbgValueAtEnd(), LLVMDIBuilderInsertDbgValueBefore(), LLVMDIBuilderInsertDeclareAtEnd(), LLVMDIBuilderInsertDeclareBefore(), LLVMDIGlobalVariableExpressionGetExpression(), LLVMDIGlobalVariableExpressionGetVariable(), LLVMDILocationGetInlinedAt(), LLVMDILocationGetScope(), LLVMDIScopeGetFile(), LLVMDIVariableGetFile(), LLVMDIVariableGetScope(), LLVMFunctionType(), LLVMGetAllocatedType(), LLVMGetArgOperand(), LLVMGetAttributesAtIndex(), LLVMGetBasicBlockParent(), LLVMGetBasicBlocks(), LLVMGetBasicBlockTerminator(), LLVMGetCalledFunctionType(), LLVMGetCalledValue(), LLVMGetCallSiteAttributes(), LLVMGetCallSiteEnumAttribute(), LLVMGetCallSiteStringAttribute(), LLVMGetClause(), LLVMGetComdat(), LLVMGetCondition(), LLVMGetCurrentDebugLocation(), LLVMGetCurrentDebugLocation2(), LLVMGetElementAsConstant(), LLVMGetElementType(), LLVMGetEntryBasicBlock(), LLVMGetEnumAttributeAtIndex(), LLVMGetFirstBasicBlock(), LLVMGetFirstFunction(), LLVMGetFirstGlobal(), LLVMGetFirstGlobalAlias(), LLVMGetFirstGlobalIFunc(), LLVMGetFirstInstruction(), LLVMGetFirstNamedMetadata(), LLVMGetFirstParam(), LLVMGetFirstUse(), LLVMGetGlobalContext(), LLVMGetGlobalIFuncResolver(), LLVMGetGlobalParent(), LLVMGetGlobalPassRegistry(), LLVMGetHandlers(), LLVMGetIncomingBlock(), LLVMGetIncomingValue(), LLVMGetInitializer(), LLVMGetInlineAsm(), LLVMGetInsertBlock(), LLVMGetInstructionParent(), LLVMGetIntrinsicDeclaration(), LLVMGetLastBasicBlock(), LLVMGetLastFunction(), LLVMGetLastGlobal(), LLVMGetLastGlobalAlias(), LLVMGetLastGlobalIFunc(), LLVMGetLastInstruction(), LLVMGetLastNamedMetadata(), LLVMGetLastParam(), LLVMGetMDNodeOperands(), LLVMGetMetadata(), LLVMGetModuleContext(), LLVMGetModuleFlag(), LLVMGetNamedFunction(), LLVMGetNamedGlobal(), LLVMGetNamedGlobalAlias(), LLVMGetNamedGlobalIFunc(), LLVMGetNamedMetadata(), LLVMGetNamedMetadataOperands(), LLVMGetNextBasicBlock(), LLVMGetNextFunction(), LLVMGetNextGlobal(), LLVMGetNextGlobalAlias(), LLVMGetNextGlobalIFunc(), LLVMGetNextInstruction(), LLVMGetNextNamedMetadata(), LLVMGetNextParam(), LLVMGetNextUse(), LLVMGetNormalDest(), LLVMGetOperand(), LLVMGetOperandUse(), LLVMGetOrInsertComdat(), LLVMGetOrInsertNamedMetadata(), LLVMGetParam(), LLVMGetParamParent(), LLVMGetParams(), LLVMGetParamTypes(), LLVMGetParentCatchSwitch(), LLVMGetPersonalityFn(), LLVMGetPreviousBasicBlock(), LLVMGetPreviousFunction(), LLVMGetPreviousGlobal(), LLVMGetPreviousGlobalAlias(), LLVMGetPreviousGlobalIFunc(), LLVMGetPreviousInstruction(), LLVMGetPreviousNamedMetadata(), LLVMGetPreviousParam(), LLVMGetReturnType(), LLVMGetStringAttributeAtIndex(), LLVMGetStructElementTypes(), LLVMGetSubprogram(), LLVMGetSubtypes(), LLVMGetSuccessor(), LLVMGetSwitchDefaultDest(), LLVMGetTypeByName(), LLVMGetTypeContext(), LLVMGetUndef(), LLVMGetUnwindDest(), LLVMGetUsedValue(), LLVMGetUser(), LLVMGlobalGetValueType(), LLVMInsertBasicBlockInContext(), LLVMInstructionClone(), LLVMInstructionGetDebugLoc(), LLVMIntrinsicGetType(), LLVMIntTypeInContext(), LLVMIsATerminatorInst(), LLVMLabelTypeInContext(), LLVMMDNodeInContext(), LLVMMDNodeInContext2(), LLVMMDStringInContext(), LLVMMDStringInContext2(), LLVMMetadataAsValue(), LLVMMetadataTypeInContext(), LLVMModuleCreateWithName(), LLVMModuleCreateWithNameInContext(), LLVMParseIRInContext(), LLVMPassManagerBuilderCreate(), LLVMPointerType(), LLVMSizeOf(), LLVMStructCreateNamed(), LLVMStructGetTypeAtIndex(), LLVMStructTypeInContext(), LLVMTemporaryMDNode(), LLVMTokenTypeInContext(), LLVMTypeOf(), LLVMValueAsBasicBlock(), LLVMValueAsMetadata(), LLVMVectorType(), LLVMVoidTypeInContext(), and remapInstruction().

◆ wrap() [2/6]

LLVMTargetDataRef llvm::wrap ( const DataLayout P)
inline

Definition at line 556 of file DataLayout.h.

References P.

◆ wrap() [3/6]

LLVMContextRef * llvm::wrap ( const LLVMContext **  Tys)
inline

Definition at line 355 of file LLVMContext.h.

◆ wrap() [4/6]

LLVMValueRef * llvm::wrap ( const Value **  Vals)
inline

Definition at line 901 of file Value.h.

◆ wrap() [5/6]

LLVMErrorRef llvm::wrap ( Error  Err)
inline

Conversion from Error to LLVMErrorRef for C error bindings.

Definition at line 1301 of file Error.h.

◆ wrap() [6/6]

LLVMTypeRef * llvm::wrap ( Type **  Tys)
inline

Definition at line 479 of file Type.h.

◆ write_double()

void llvm::write_double ( raw_ostream S,
double  D,
FloatStyle  Style,
Optional< size_t >  Precision = None 
)

◆ write_hex()

void llvm::write_hex ( raw_ostream S,
uint64_t  N,
HexPrintStyle  Style,
Optional< size_t >  Width = None 
)

◆ write_integer() [1/6]

void llvm::write_integer ( raw_ostream S,
int  N,
size_t  MinDigits,
IntegerStyle  Style 
)

Definition at line 108 of file NativeFormatting.cpp.

References N, and write_signed().

◆ write_integer() [2/6]

void llvm::write_integer ( raw_ostream S,
long long  N,
size_t  MinDigits,
IntegerStyle  Style 
)

Definition at line 128 of file NativeFormatting.cpp.

References N, and write_signed().

◆ write_integer() [3/6]

void llvm::write_integer ( raw_ostream S,
long  N,
size_t  MinDigits,
IntegerStyle  Style 
)

Definition at line 118 of file NativeFormatting.cpp.

References N, and write_signed().

◆ write_integer() [4/6]

void llvm::write_integer ( raw_ostream S,
unsigned int  N,
size_t  MinDigits,
IntegerStyle  Style 
)

◆ write_integer() [5/6]

void llvm::write_integer ( raw_ostream S,
unsigned long long  N,
size_t  MinDigits,
IntegerStyle  Style 
)

Definition at line 123 of file NativeFormatting.cpp.

References N, and write_unsigned().

◆ write_integer() [6/6]

void llvm::write_integer ( raw_ostream S,
unsigned long  N,
size_t  MinDigits,
IntegerStyle  Style 
)

Definition at line 113 of file NativeFormatting.cpp.

References N, and write_unsigned().

◆ WriteGraph()

template<typename GraphType >
raw_ostream & llvm::WriteGraph ( raw_ostream O,
const GraphType &  G,
bool  ShortNames = false,
const Twine &  Title = "" 
)

◆ writeSignedDecimal()

static char * llvm::writeSignedDecimal ( char dst,
int  value 
)
static

Definition at line 679 of file APFloat.cpp.

References value, and writeUnsignedDecimal().

◆ writeUnsignedDecimal()

static char * llvm::writeUnsignedDecimal ( char dst,
unsigned int  n 
)
static

Definition at line 661 of file APFloat.cpp.

Referenced by writeSignedDecimal().

◆ xxHash64() [1/2]

uint64_t llvm::xxHash64 ( llvm::ArrayRef< uint8_t >  Data)

Definition at line 136 of file xxhash.cpp.

References xxHash64().

◆ xxHash64() [2/2]

uint64_t llvm::xxHash64 ( llvm::StringRef  Data)

Variable Documentation

◆ BitReverseTable256

const unsigned char llvm::BitReverseTable256[256]
static
Initial value:
= {
#define R2(n)
#define R4(n)
#define R6(n)
R6(0), R6(2), R6(1), R6(3)
}
#define R6(n)

Macro compressed bit reversal table for 256 bits.

http://graphics.stanford.edu/~seander/bithacks.html#BitReverseTable

Definition at line 256 of file MathExtras.h.

Referenced by reverseBits().

◆ BreakCriticalEdgesID

char& llvm::BreakCriticalEdgesID
extern

◆ ColorCategory

cl::OptionCategory llvm::ColorCategory
extern

◆ CurrentDebugType

ManagedStatic<std::vector<std::string> > llvm::CurrentDebugType
static

Definition at line 45 of file Debug.cpp.

Referenced by isCurrentDebugType(), and setCurrentDebugTypes().

◆ DebugFlag

bool llvm::DebugFlag = false

This boolean is set to true if the '-debug' command line option is specified.

Exported boolean set by the -debug option.

This should probably not be referenced directly, instead, use the DEBUG macro below.

Definition at line 43 of file Debug.cpp.

Referenced by dbgs().

◆ DefaultMaxUsesToExplore

unsigned constexpr llvm::DefaultMaxUsesToExplore = 20
constexpr

The default value for MaxUsesToExplore argument.

It's relatively small to keep the cost of analysis reasonable for clients like BasicAliasAnalysis, where the results can't be cached. TODO: we should probably introduce a caching CaptureTracking analysis and use it where possible. The caching version can use much higher limit or don't have this cap at all.

Definition at line 30 of file CaptureTracking.h.

◆ DefMaxInstsToScan

cl::opt< unsigned > llvm::DefMaxInstsToScan
extern

The default number of maximum instructions to scan in the block, used by FindAvailableLoadedValue().

DefMaxInstsToScan - the default number of maximum instructions.

to scan in the block, used by FindAvailableLoadedValue(). FindAvailableLoadedValue() was introduced in r60148, to improve jump threading in part by eliminating partially redundant loads. At that point, the value of MaxInstsToScan was already set to '6' without documented explanation.

Referenced by llvm::JumpThreadingPass::SimplifyPartiallyRedundantLoad(), and llvm::InstCombiner::visitLoadInst().

◆ DemoteRegisterToMemoryID

char & llvm::DemoteRegisterToMemoryID = RegToMem::ID
extern

Definition at line 125 of file Reg2Mem.cpp.

◆ DisableABIBreakingChecks

int llvm::DisableABIBreakingChecks

Definition at line 180 of file Error.cpp.

◆ EnableDebugBuffering

bool llvm::EnableDebugBuffering = false
extern

EnableDebugBuffering - This defaults to false.

EnableDebugBuffering - Turn on signal handler installation.

If true, the debug stream will install signal handlers to dump any buffered debug output. It allows clients to selectively allow the debug stream to install signal handlers if they are certain there will be no conflict.

Definition at line 165 of file Debug.cpp.

Referenced by dbgs().

◆ EnableLoopInterleaving

cl::opt< bool > llvm::EnableLoopInterleaving
extern

◆ EnableLoopVectorization

cl::opt< bool > llvm::EnableLoopVectorization
extern

◆ EnableMSSALoopDependency

cl::opt< bool > llvm::EnableMSSALoopDependency
extern

◆ EnableTiming

cl::opt< bool, true > llvm::EnableTiming("time-passes", cl::location(TimePassesIsEnabled), cl::Hidden, cl::desc("Time each pass, printing elapsed time for each on exit")) ( "time-passes"  ,
cl::location(TimePassesIsEnabled ,
cl::Hidden  ,
cl::desc("Time each pass, printing elapsed time for each on exit")   
)
static

◆ firstByteMark

const UTF8 llvm::firstByteMark[7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC }
static

Definition at line 129 of file ConvertUTF.cpp.

Referenced by ConvertUTF16toUTF8(), and ConvertUTF32toUTF8().

◆ ForgetSCEVInLoopUnroll

cl::opt< bool > llvm::ForgetSCEVInLoopUnroll
extern

◆ halfBase

const UTF32 llvm::halfBase = 0x0010000UL
static

◆ halfMask

const UTF32 llvm::halfMask = 0x3FFUL
static

Definition at line 87 of file ConvertUTF.cpp.

Referenced by ConvertUTF32toUTF16(), and ConvertUTF8toUTF16().

◆ halfShift

const int llvm::halfShift = 10
static

◆ hexDigitsLower

const char llvm::hexDigitsLower[] = "0123456789abcdef0"
static

Definition at line 632 of file APFloat.cpp.

◆ hexDigitsUpper

const char llvm::hexDigitsUpper[] = "0123456789ABCDEF0"
static

Definition at line 633 of file APFloat.cpp.

◆ huge_valf

const float llvm::huge_valf = HUGE_VALF

Use this rather than HUGE_VALF; the latter causes warnings on MSVC.

Definition at line 28 of file MathExtras.cpp.

◆ InferAddressSpacesID

char& llvm::InferAddressSpacesID
extern

◆ infinityL

const char llvm::infinityL[] = "infinity"
static

Definition at line 634 of file APFloat.cpp.

◆ infinityU

const char llvm::infinityU[] = "INFINITY"
static

Definition at line 635 of file APFloat.cpp.

◆ InstructionNamerID

char& llvm::InstructionNamerID
extern

◆ kAsanStackLeftRedzoneMagic

const int llvm::kAsanStackLeftRedzoneMagic = 0xf1
static

Definition at line 23 of file ASanStackFrameLayout.h.

Referenced by GetShadowBytes().

◆ kAsanStackMidRedzoneMagic

const int llvm::kAsanStackMidRedzoneMagic = 0xf2
static

Definition at line 24 of file ASanStackFrameLayout.h.

Referenced by GetShadowBytes().

◆ kAsanStackRightRedzoneMagic

const int llvm::kAsanStackRightRedzoneMagic = 0xf3
static

Definition at line 25 of file ASanStackFrameLayout.h.

Referenced by GetShadowBytes().

◆ kAsanStackUseAfterReturnMagic

const int llvm::kAsanStackUseAfterReturnMagic = 0xf5
static

Definition at line 26 of file ASanStackFrameLayout.h.

◆ kAsanStackUseAfterScopeMagic

const int llvm::kAsanStackUseAfterScopeMagic = 0xf8
static

Definition at line 27 of file ASanStackFrameLayout.h.

Referenced by GetShadowBytesAfterScope().

◆ kMinAlignment

const size_t llvm::kMinAlignment = 16
static

Definition at line 36 of file ASanStackFrameLayout.cpp.

Referenced by ComputeASanStackFrameLayout().

◆ LCSSAID

char & llvm::LCSSAID = LCSSAWrapperPass::ID
extern

Definition at line 467 of file LCSSA.cpp.

Referenced by getLoopAnalysisUsage().

◆ LibCallsShrinkWrapPassID

char& llvm::LibCallsShrinkWrapPassID = LibCallsShrinkWrapLegacyPass::ID

Definition at line 543 of file LibCallsShrinkWrap.cpp.

◆ LLVMLoopUnrollFollowupAll

const char* const llvm::LLVMLoopUnrollFollowupAll = "llvm.loop.unroll.followup_all"

Metadata attribute names

Definition at line 41 of file UnrollLoop.h.

Referenced by CloneLoopBlocks(), and tryToUnrollLoop().

◆ LLVMLoopUnrollFollowupRemainder

const char* const llvm::LLVMLoopUnrollFollowupRemainder
Initial value:
=
"llvm.loop.unroll.followup_remainder"

Definition at line 44 of file UnrollLoop.h.

Referenced by CloneLoopBlocks(), and tryToUnrollLoop().

◆ LLVMLoopUnrollFollowupUnrolled

const char* const llvm::LLVMLoopUnrollFollowupUnrolled
Initial value:
=
"llvm.loop.unroll.followup_unrolled"

Definition at line 42 of file UnrollLoop.h.

Referenced by tryToUnrollLoop().

◆ LoopSimplifyID

loop Canonicalize natural false char & llvm::LoopSimplifyID = LoopSimplify::ID
extern

Definition at line 791 of file LoopSimplify.cpp.

Referenced by LoopFuseLegacy::getAnalysisUsage(), and getLoopAnalysisUsage().

◆ LowerInvokePassID

char & llvm::LowerInvokePassID = LowerInvokeLegacyPass::ID

Definition at line 83 of file LowerInvoke.cpp.

◆ LowerSwitchID

char & llvm::LowerSwitchID = LowerSwitch::ID
extern

Definition at line 132 of file LowerSwitch.cpp.

Referenced by llvm::UnifyFunctionExitNodes::getAnalysisUsage().

◆ LTODiscardValueNames

cl::opt< bool > llvm::LTODiscardValueNames ( "lto-discard-value-names"  ,
cl::desc("Strip names from Value during LTO (other than GlobalValue).")  ,
cl::init(false)  ,
cl::Hidden   
)

◆ LTOStatsFile

cl::opt< std::string > llvm::LTOStatsFile("lto-stats-file", cl::desc("Save statistics to the specified file"), cl::Hidden) ( "lto-stats-file"  ,
cl::desc("Save statistics to the specified file")  ,
cl::Hidden   
)

◆ maxExponent

const unsigned int llvm::maxExponent = 16383

Definition at line 185 of file APFloat.cpp.

Referenced by powerOf5().

◆ maxPowerOfFiveExponent

const unsigned int llvm::maxPowerOfFiveExponent = maxExponent + maxPrecision - 1

Definition at line 187 of file APFloat.cpp.

◆ maxPowerOfFiveParts

const unsigned int llvm::maxPowerOfFiveParts = 2 + ((maxPowerOfFiveExponent * 815) / (351 * APFloatBase::integerPartWidth))

Definition at line 188 of file APFloat.cpp.

Referenced by powerOf5().

◆ maxPrecision

const unsigned int llvm::maxPrecision = 113

Definition at line 186 of file APFloat.cpp.

◆ NaNL

const char llvm::NaNL[] = "nan"
static

Definition at line 636 of file APFloat.cpp.

◆ NaNU

const char llvm::NaNU[] = "NAN"
static

Definition at line 637 of file APFloat.cpp.

◆ offsetsFromUTF8

const UTF32 llvm::offsetsFromUTF8[6]
static
Initial value:
= { 0x00000000UL, 0x00003080UL, 0x000E2080UL,
0x03C82080UL, 0xFA082080UL, 0x82082080UL }

Definition at line 119 of file ConvertUTF.cpp.

Referenced by ConvertUTF8toUTF16(), and ConvertUTF8toUTF32Impl().

◆ PGOMemOPSizeOptID

char& llvm::PGOMemOPSizeOptID = PGOMemOPSizeOptLegacyPass::ID

Definition at line 437 of file PGOMemOPSizeOpt.cpp.

◆ RemarksFilename

cl::opt< std::string > llvm::RemarksFilename ( "lto-pass-remarks-output"  ,
cl::desc("Output filename for pass remarks")  ,
cl::value_desc("filename")   
)

◆ RemarksFormat

cl::opt< std::string > llvm::RemarksFormat ( "lto-pass-remarks-format"  ,
cl::desc("The format used for serializing remarks (default: YAML)")  ,
cl::value_desc("format")  ,
cl::init("yaml")   
)

◆ RemarksPasses

cl::opt< std::string > llvm::RemarksPasses ( "lto-pass-remarks-filter"  ,
cl::desc("Only record optimization remarks from passes whose " "names match the given regular expression")  ,
cl::value_desc("regex")   
)

◆ RemarksWithHotness

cl::opt< bool > llvm::RemarksWithHotness ( "lto-pass-remarks-with-hotness"  ,
cl::desc("With PGO, include profile count in optimization remarks")  ,
cl::Hidden   
)

◆ RunSLPVectorization

cl::opt< bool > llvm::RunSLPVectorization
extern

◆ semBogus

const fltSemantics llvm::semBogus = {0, 0, 0, 0}
static

Definition at line 76 of file APFloat.cpp.

◆ semIEEEdouble

const fltSemantics llvm::semIEEEdouble = {1023, -1022, 53, 64}
static

Definition at line 73 of file APFloat.cpp.

◆ semIEEEhalf

const fltSemantics llvm::semIEEEhalf = {15, -14, 11, 16}
static

Definition at line 71 of file APFloat.cpp.

◆ semIEEEquad

const fltSemantics llvm::semIEEEquad = {16383, -16382, 113, 128}
static

Definition at line 74 of file APFloat.cpp.

◆ semIEEEsingle

const fltSemantics llvm::semIEEEsingle = {127, -126, 24, 32}
static

Definition at line 72 of file APFloat.cpp.

◆ semPPCDoubleDouble

const fltSemantics llvm::semPPCDoubleDouble = {-1, 0, 0, 0}
static

Definition at line 87 of file APFloat.cpp.

Referenced by llvm::detail::frexp(), and llvm::detail::scalbn().

◆ semPPCDoubleDoubleLegacy

const fltSemantics llvm::semPPCDoubleDoubleLegacy
static
Initial value:
= {1023, -1022 + 53,
53 + 53, 128}

Definition at line 113 of file APFloat.cpp.

◆ semX87DoubleExtended

const fltSemantics llvm::semX87DoubleExtended = {16383, -16382, 64, 80}
static

Definition at line 75 of file APFloat.cpp.

◆ SetLicmMssaNoAccForPromotionCap

cl::opt< unsigned > llvm::SetLicmMssaNoAccForPromotionCap
extern

◆ SetLicmMssaOptCap

cl::opt< unsigned > llvm::SetLicmMssaOptCap
extern

◆ TimePassesIsEnabled

bool llvm::TimePassesIsEnabled = false

If the user specifies the -time-passes argument on an LLVM tool command line then the value of this boolean will be true, otherwise false.

This is the storage for the -time-passes option.

Definition at line 40 of file PassTimingInfo.cpp.

Referenced by parseIR().

◆ TimeTraceGranularity

cl::opt< unsigned > llvm::TimeTraceGranularity("time-trace-granularity", cl::desc( "Minimum time granularity (in microseconds) traced by time profiler"), cl::init(500)) ( "time-trace-granularity"  ,
cl::desc( "Minimum time granularity (in microseconds) traced by time profiler")  ,
cl::init(500)   
)
static

◆ TimeTraceProfilerInstance

TimeTraceProfiler * llvm::TimeTraceProfilerInstance = nullptr

◆ trailingBytesForUTF8

const char llvm::trailingBytesForUTF8[256]
static
Initial value:
= {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5
}

Definition at line 103 of file ConvertUTF.cpp.

Referenced by ConvertUTF8toUTF16(), ConvertUTF8toUTF32Impl(), getNumBytesForUTF8(), isLegalUTF8Sequence(), and isLegalUTF8String().

◆ VerifyDomInfo

bool llvm::VerifyDomInfo = false
extern

Enables verification of dominator trees.

Definition at line 31 of file Dominators.cpp.

Referenced by llvm::PostDominatorTreeWrapperPass::verifyAnalysis(), and llvm::DominatorTreeWrapperPass::verifyAnalysis().

◆ VerifyLoopInfo

bool llvm::VerifyLoopInfo = false
extern

Enables verification of loop info.

Definition at line 51 of file LoopInfo.cpp.

Referenced by llvm::LoopInfoWrapperPass::verifyAnalysis().

◆ VerifyMemorySSA

bool llvm::VerifyMemorySSA = false
extern